[meta-oe] meta-openembedded: Fix CARGO_BUILD_TARGET

Message ID 20220222035558.463828-1-andrew@aj.id.au
State New
Headers show
Series [meta-oe] meta-openembedded: Fix CARGO_BUILD_TARGET | expand

Commit Message

Andrew Jeffery Feb. 22, 2022, 3:55 a.m. UTC
On modern Power systems `uname -m` yields 'ppc64le' but Rust knows the
architecture as 'powerpc64le'. Use RUST_HOST_SYS rather than HOST_SYS to
ensure we have the right arch name.

Change-Id: I63640e39d29a00c3101425213ba4b1d248ac9ace
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 meta-python/classes/pyo3.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/meta-python/classes/pyo3.bbclass b/meta-python/classes/pyo3.bbclass
index 6ce21329c2ef..c2e8e7b385c0 100644
--- a/meta-python/classes/pyo3.bbclass
+++ b/meta-python/classes/pyo3.bbclass
@@ -3,12 +3,12 @@ 
 # and setuptools_rust properly set up the environment for cross compilation
 #
 
-inherit cargo python3-dir siteinfo
+inherit cargo python3-dir siteinfo rust-common
 
 export PYO3_CROSS="1"
 export PYO3_CROSS_PYTHON_VERSION="${PYTHON_BASEVERSION}"
 export PYO3_CROSS_LIB_DIR="${STAGING_LIBDIR}"
-export CARGO_BUILD_TARGET="${HOST_SYS}"
+export CARGO_BUILD_TARGET="${RUST_HOST_SYS}"
 export RUSTFLAGS
 export PYO3_PYTHON="${PYTHON}"
 export PYO3_CONFIG_FILE="${WORKDIR}/pyo3.config"