diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-07-23 12:03:43 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-07-23 12:10:32 +0100 |
commit | 094a54d85c3583d388c13ad595fbf3bd4a9867d1 (patch) | |
tree | 399421d80da7895bc3623d27c883f950618433ba /meta/recipes-devtools/rust/rust-common.inc | |
parent | 7181e326f1814cbf8b7960b0d4f02bd3a1ce14f8 (diff) | |
download | openembedded-core-contrib-094a54d85c3583d388c13ad595fbf3bd4a9867d1.tar.gz |
rust-cross/rust-common: Merge arm target handling code to fix cross-canadian
rust-cross had special handling for armv7 targets but we also need this
for cross-canadian. Merge the code into the main function so everything is
consistent.
Also then fix the arm definition to be arm-eabi since ABI is correctly
being looked up.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rust/rust-common.inc')
-rw-r--r-- | meta/recipes-devtools/rust/rust-common.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc index 37abd2cd26..82ff03b908 100644 --- a/meta/recipes-devtools/rust/rust-common.inc +++ b/meta/recipes-devtools/rust/rust-common.inc @@ -297,6 +297,12 @@ def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""): sys = sys_for(d, thing) prefix = prefix_for(d, thing) + if thing == "TARGET": + abi = d.getVar('ABIEXTENSION') + # arm and armv7 have different targets in llvm + if arch == "arm" and target_is_armv7(d): + arch = 'armv7' + rust_arch = oe.rust.arch_to_rust_arch(arch) if abi: |