[PATCH] rust: fix issue building cross-canadian tools for aarch64 on x86_64


Peter Bergin
 

Commit bd36593ba3db758b3eacc974e48468a665967961 did introduce a
regression when building package rust-cross-canadian-aarch64
on a x86_64 host. This commit will fix that configuration.

Suggested-by: Richard Purdie <richard.purdie@...>
Signed-off-by: Peter Bergin <peter@...>
---
meta/recipes-devtools/rust/rust-common.inc | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc
index 621cd4ad57..ef70c48d0f 100644
--- a/meta/recipes-devtools/rust/rust-common.inc
+++ b/meta/recipes-devtools/rust/rust-common.inc
@@ -309,10 +309,7 @@ def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""):

# build tspec
tspec = {}
- if bb.data.inherits_class('cross-canadian', d):
- tspec['llvm-target'] = d.getVar('RUST_HOST_SYS', arch_abi)
- else:
- tspec['llvm-target'] = d.getVar('RUST_TARGET_SYS', arch_abi)
+ tspec['llvm-target'] = d.getVar('RUST_TARGET_SYS', arch_abi)
tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi)
tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi))
tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi)
--
2.34.1

Join openembedded-core@lists.openembedded.org to automatically receive all group messages.