rust-native shouldn't depend on TARGET variables

Similar to 3b783652cc, this makes sure
rust-native does not depend on target variables. This allow one
rust-native to be shared between machines of different architectures
again.

For the record, the following guide was used to find out why
do_rust_gen_targets differed between different machines.
https://wiki.yoctoproject.org/wiki/TipsAndTricks/Understanding_what_changed_(diffsigs_etc)
This commit is contained in:
Johan Anderholm
2021-02-16 14:36:56 +01:00
parent 341a3c77bb
commit 920328c8d8
2 changed files with 8 additions and 10 deletions
+5 -1
View File
@@ -10,10 +10,14 @@ python do_rust_gen_targets () {
bb.debug(1, "rust_gen_target for " + thing)
features = ""
cpu = "generic"
arch = d.getVar('{}_ARCH'.format(thing))
if thing is "TARGET":
# 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)
rust_gen_target(d, thing, wd, features, cpu, arch)
}
# Otherwise we'll depend on what we provide