summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-05 15:27:18 +0100
committerSteve Sakoman <steve@sakoman.com>2023-12-07 08:09:37 -1000
commit0adada8111c17e8e5a7c32cef86bdb8e7dfd79d3 (patch)
treeeee17ccb4bf6640880a54e144f96d5a121d44785 /meta/recipes-devtools
parentd8c030ef90272e42a1697f5195f887d09878aa01 (diff)
downloadopenembedded-core-contrib-0adada8111c17e8e5a7c32cef86bdb8e7dfd79d3.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> (cherry picked from commit ff3c3dbbd2bf1bb7bb70b55cca203e9eedcf14a8) Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/rust/rust-common.inc6
-rw-r--r--meta/recipes-devtools/rust/rust-cross.inc7
2 files changed, 7 insertions, 6 deletions
diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc
index ac00fd3d43..3252827818 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:
diff --git a/meta/recipes-devtools/rust/rust-cross.inc b/meta/recipes-devtools/rust/rust-cross.inc
index f6babfeeda..4c026b1f38 100644
--- a/meta/recipes-devtools/rust/rust-cross.inc
+++ b/meta/recipes-devtools/rust/rust-cross.inc
@@ -8,15 +8,10 @@ python do_rust_gen_targets () {
features = ""
cpu = "generic"
arch = d.getVar('{}_ARCH'.format(thing))
- abi = ""
if thing is "TARGET":
- abi = d.getVar('ABIEXTENSION')
- # arm and armv7 have different targets in llvm
- if arch == "arm" and target_is_armv7(d):
- arch = 'armv7'
features = d.getVar('TARGET_LLVM_FEATURES') or ""
cpu = d.getVar('TARGET_LLVM_CPU')
- rust_gen_target(d, thing, wd, features, cpu, arch, abi)
+ rust_gen_target(d, thing, wd, features, cpu, arch)
}
# Otherwise we'll depend on what we provide