From 73272156e66a33dad4f00a2badc4306aaac400f6 Mon Sep 17 00:00:00 2001 From: Andrew Jeffery Date: Tue, 1 Mar 2022 01:09:47 +1030 Subject: rust: Introduce RUST_BUILD_ARCH RUST_BUILD_ARCH contains the arch_to_rust_arch()-translated value of BUILD_ARCH. This is necessary to acquire the correct snapshot artifacts under Linux where `uname -m` reports "ppc64le" rather than "powerpc64le". Change-Id: I6aec23aced8e1c6f0bfc46fe52531b0c16bcf687 (From OE-Core rev: c13afbade8d480807b9de70c56dcd650496f06b2) Signed-off-by: Andrew Jeffery Signed-off-by: Richard Purdie --- meta/classes/rust-common.bbclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'meta/classes/rust-common.bbclass') diff --git a/meta/classes/rust-common.bbclass b/meta/classes/rust-common.bbclass index 8cfe864ca3..65ad677499 100644 --- a/meta/classes/rust-common.bbclass +++ b/meta/classes/rust-common.bbclass @@ -89,6 +89,10 @@ def rust_base_triple(d, thing): libc = bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hf', '', d) return arch + vendor + '-' + os + libc + +# In some cases uname and the toolchain differ on their idea of the arch name +RUST_BUILD_ARCH = "${@oe.rust.arch_to_rust_arch(d.getVar('BUILD_ARCH'))}" + # Naming explanation # Yocto # - BUILD_SYS - Yocto triple of the build environment -- cgit v1.2.3-54-g00ecf