summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-05 15:27:19 +0100
committerSteve Sakoman <steve@sakoman.com>2023-12-12 04:20:35 -1000
commite01044d629f226040dbb470c8f20d6433d7fbb33 (patch)
tree85b9153bf353fc0e7b43299992f02e8edef1d28a
parent079e50aba036cd0155767c3f44134d0130fff05b (diff)
downloadpoky-e01044d629f226040dbb470c8f20d6433d7fbb33.tar.gz
rust-cross: Simplfy the rust_gen_target calls
Match the code in rust-cross-canadian so that further simplifications can be considered in future. (From OE-Core rev: 9fb5f81f58306b2d355049698b6a17d045bd5e1e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5cb62d0a33777cb9afb1eea5f736a2580ce50dc7) Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-devtools/rust/rust-common.inc12
-rw-r--r--meta/recipes-devtools/rust/rust-cross.inc16
2 files changed, 10 insertions, 18 deletions
diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc
index 3252827818..a73367bbd5 100644
--- a/meta/recipes-devtools/rust/rust-common.inc
+++ b/meta/recipes-devtools/rust/rust-common.inc
@@ -119,12 +119,12 @@ def llvm_features(d):
119 119
120 120
121## arm-unknown-linux-gnueabihf 121## arm-unknown-linux-gnueabihf
122DATA_LAYOUT[arm] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" 122DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
123TARGET_ENDIAN[arm] = "little" 123TARGET_ENDIAN[arm-eabi] = "little"
124TARGET_POINTER_WIDTH[arm] = "32" 124TARGET_POINTER_WIDTH[arm-eabi] = "32"
125TARGET_C_INT_WIDTH[arm] = "32" 125TARGET_C_INT_WIDTH[arm-eabi] = "32"
126MAX_ATOMIC_WIDTH[arm] = "64" 126MAX_ATOMIC_WIDTH[arm-eabi] = "64"
127FEATURES[arm] = "+v6,+vfp2" 127FEATURES[arm-eabi] = "+v6,+vfp2"
128 128
129## armv7-unknown-linux-gnueabihf 129## armv7-unknown-linux-gnueabihf
130DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" 130DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
diff --git a/meta/recipes-devtools/rust/rust-cross.inc b/meta/recipes-devtools/rust/rust-cross.inc
index 4c026b1f38..2e47a3aa5f 100644
--- a/meta/recipes-devtools/rust/rust-cross.inc
+++ b/meta/recipes-devtools/rust/rust-cross.inc
@@ -1,17 +1,9 @@
1python do_rust_gen_targets () { 1python do_rust_gen_targets () {
2 wd = d.getVar('WORKDIR') + '/targets/' 2 wd = d.getVar('WORKDIR') + '/targets/'
3 # It is important 'TARGET' is last here so that it overrides our less 3 # Order of BUILD, HOST, TARGET is important in case the files overwrite, most specific last
4 # informed choices for BUILD & HOST if TARGET happens to be the same as 4 rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH'))
5 # either of them. 5 rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH'))
6 for thing in ['BUILD', 'HOST', 'TARGET']: 6 rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH'))
7 bb.debug(1, "rust_gen_target for " + thing)
8 features = ""
9 cpu = "generic"
10 arch = d.getVar('{}_ARCH'.format(thing))
11 if thing is "TARGET":
12 features = d.getVar('TARGET_LLVM_FEATURES') or ""
13 cpu = d.getVar('TARGET_LLVM_CPU')
14 rust_gen_target(d, thing, wd, features, cpu, arch)
15} 7}
16 8
17# Otherwise we'll depend on what we provide 9# Otherwise we'll depend on what we provide