diff options
Diffstat (limited to 'meta/recipes-devtools/rust/rust_1.81.0.bb')
-rw-r--r-- | meta/recipes-devtools/rust/rust_1.81.0.bb | 13 |
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 | ||
288 | FILES:${PN} += "${base_prefix}/environment-setup.d" | ||
289 | |||
277 | EXTRA_TOOLS ?= "cargo-clippy clippy-driver rustfmt" | 290 | EXTRA_TOOLS ?= "cargo-clippy clippy-driver rustfmt" |
278 | rust_do_install:class-target() { | 291 | rust_do_install:class-target() { |
279 | export PSEUDO_UNLOAD=1 | 292 | export PSEUDO_UNLOAD=1 |