summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/rust_1.81.0.bb
diff options
context:
space:
mode:
authorHarish Sadineni <Harish.Sadineni@windriver.com>2025-01-16 05:48:31 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-01-29 16:16:54 +0000
commita9e82c4f3c29cecb84d841d76fa3d4ca3597c544 (patch)
treeba217f97ea58661a4e879e55f820e7d9633de35c /meta/recipes-devtools/rust/rust_1.81.0.bb
parentf880bfba10d51ec0dfbf41c1d8ed8fe0e3389a8d (diff)
downloadpoky-a9e82c4f3c29cecb84d841d76fa3d4ca3597c544.tar.gz
rust: fix for rust multilib sdk configuration
YOCTO [#15061] The rust sdk installs both 'rust.sh' and 'cargo.sh' for lib32 and lib64 in the same location. This causes below error while installing the lib32 & lib64 binaries: Error: Transaction test error: file /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/environment-setup.d/cargo.sh conflicts between attempted installs of rust-cross-canadian-arm-1.67.1-r0.x86_64_nativesdk and rust-cross-canadian-aarch64-1.67.1-r0.x86_64_nativesdk file /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/environment-setup.d/rust.sh conflicts between attempted installs of rust-cross-canadian-arm-1.67.1-r0.x86_64_nativesdk and rust-cross-canadian-aarch64-1.67.1-r0.x86_64_nativesdk ERROR: Task (virtual:multilib:lib32:/media/build/poky/meta/recipes-sato/images/core-image-sato.bb:do_populate_sdk) failed with exit code '1' The change includes: - Prepending '${RUST_TARGET_SYS}' to 'rust.sh' to differentiate between target systems. - Moving the non-target-specific environment variables to 'nativesdk-cargo' and 'nativesdk-rust', instead of being managed by the cross-canadian recipe. - Removed the redundant cargo config file from the 'rust-cross-canadian.inc' file. (From OE-Core rev: df39aadb49f55795949369b3c770199d63475b8f) Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rust/rust_1.81.0.bb')
-rw-r--r--meta/recipes-devtools/rust/rust_1.81.0.bb13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/rust_1.81.0.bb b/meta/recipes-devtools/rust/rust_1.81.0.bb
index b583508456..24a0319dbe 100644
--- a/meta/recipes-devtools/rust/rust_1.81.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.81.0.bb
@@ -272,8 +272,21 @@ rust_do_install:class-nativesdk() {
272 rm ${D}${libdir}/rustlib/install.log 272 rm ${D}${libdir}/rustlib/install.log
273 rm ${D}${libdir}/rustlib/manifest* 273 rm ${D}${libdir}/rustlib/manifest*
274 rm ${D}${libdir}/rustlib/${RUST_HOST_SYS}/lib/libstd*.so 274 rm ${D}${libdir}/rustlib/${RUST_HOST_SYS}/lib/libstd*.so
275
276 ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d
277 mkdir "${ENV_SETUP_DIR}"
278 RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
279 RUST_HOST_TRIPLE=`echo ${RUST_HOST_SYS} | tr '[:lower:]' '[:upper:]' | sed 's/-/_/g'`
280 SDKLOADER=${@bb.utils.contains('SDK_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'i686', 'ld-linux.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'aarch64', 'ld-linux-aarch64.so.1', '', d)}${@bb.utils.contains('SDK_ARCH', 'ppc64le', 'ld64.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'riscv64', 'ld-linux-riscv64-lp64d.so.1', '', d)}
281
282 cat <<- EOF > "${RUST_ENV_SETUP_SH}"
283 export CARGO_TARGET_${RUST_HOST_TRIPLE}_RUNNER="\$OECORE_NATIVE_SYSROOT/lib/${SDKLOADER}"
284 EOF
285 chown -R root.root ${D}
275} 286}
276 287
288FILES:${PN} += "${base_prefix}/environment-setup.d"
289
277EXTRA_TOOLS ?= "cargo-clippy clippy-driver rustfmt" 290EXTRA_TOOLS ?= "cargo-clippy clippy-driver rustfmt"
278rust_do_install:class-target() { 291rust_do_install:class-target() {
279 export PSEUDO_UNLOAD=1 292 export PSEUDO_UNLOAD=1