Commit Graph

7 Commits

Author SHA1 Message Date
Richard Purdie
0b374dc724 rust-target-config: Make target workaround generic
Ensure the 'target' data is set for both HOST and TARGET queries
as appropriate to work correctly in cross configurations.

(From OE-Core rev: ec15882fbf396de8d3a5921a3028850ba3fccc48)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
b1d8d2a3bf rust: Generate per recipe target configuration files
Instead of generating target configuration files centrally and often getting
it wrong, or having trouble finding the right set, generate them dynamically
from the bbclass into WORKDIR per recipe.

(From OE-Core rev: 9160e4a37561d8ac882057450a818621bec13bed)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
9a093d0348 rust-target-config: Show clear error when target isn't defined
(From OE-Core rev: b30ee171de9cd736d16d783410cf748e35309257)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
5c45b73c8f rust: Switch to use RUST_XXX_SYS consistently
The code was using a mixture of XXX_SYS and RUST_XXX_SYS. Use
RUST_XXX_SYS consistently and add the variables to the global exclsion
on signatures as they're reflected in the directory triplets and trying
to filter them out the hashes separately is too painful.

(From OE-Core rev: ee0c0fdf9c1eba9eece6ed1293fda25bf18964b3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
52ef977c95 rust-target-config: Add mips n32 target information
Add MIPS n32 target information. This appears to be correct but
building libstd-rs for the target doesn't work.

(From OE-Core rev: 255be90dc8e3625060c9b8ccc2ec3a71f24470d2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Richard Purdie
e75e781a48 rust-target-config: Allow the targets generated to be configurable
Remove further code duplication by allowing the main function to be
configurable.

(From OE-Core rev: 2d4b35a0db1220e7a7f1b6776223aa4d40a3f246)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-28 11:07:33 +01:00
Richard Purdie
1e04c8aafb rust-target-config: Create new class to contain target json config generation
Currently most of the rust recipes use this code but it is all piecemeal.
Turn the code into a class where things can start to be rationalised. Ultimately
some of the data and python code should be moved to a python library but one step
at a time.

No functionality changes.

(From OE-Core rev: 3795285cbf362e13b8151bfdbe1bce999ac28641)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-28 11:07:33 +01:00