summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorPeter Tatrai <peter.tatrai.ext@siemens.com>2025-10-27 11:28:58 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:15:35 +0000
commit9fc1cfb987778f858da3d0f3b4eedb57c0799c2b (patch)
tree4ef5a2105020092dceccb17e22c1224974cd7532 /meta/recipes-devtools
parentfcf39462961623b74e2c67a5bbfc7937e332d659 (diff)
downloadpoky-9fc1cfb987778f858da3d0f3b4eedb57c0799c2b.tar.gz
rust: add missing zlib and zstd dependencies
Use WRAPPER_TARGET_EXTRALD to pass '-lz -lzstd' to the target linker wrapper, Rust's internal LLVM requires zlib and zstd compression libraries when building rustc_codegen_llvm and other compiler components. Without these dependencies, building Rust for PowerPC target fails with linker errors: error: linking with `target-rust-ccld` failed: exit status: 1 = note: undefined reference to `compress2' = note: undefined reference to `uncompress' = note: undefined reference to `ZSTD_decompress' = note: undefined reference to `ZSTD_isError' = note: undefined reference to `ZSTD_compress2' = note: undefined reference to `crc32' This manifested in oe-selftest failure on qemuppc: oe-selftest -r rust.RustSelfTestSystemEmulated.test_rust Fix rust-common.bbclass wrapper generation to properly split EXTRALD flags into separate arguments (extend instead of append), making the wrapper mechanism work correctly for multi-flag values like '-lz -lzstd'. (From OE-Core rev: 5aa995eec5e1399a536686683405ce35d6ab991e) Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/rust/rust_1.90.0.bb5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/rust_1.90.0.bb b/meta/recipes-devtools/rust/rust_1.90.0.bb
index e7f3985332..50b19267fe 100644
--- a/meta/recipes-devtools/rust/rust_1.90.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.90.0.bb
@@ -69,6 +69,11 @@ do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot"
69do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER" 69do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER"
70do_rust_setup_snapshot[depends] += "patchelf-native:do_populate_sysroot" 70do_rust_setup_snapshot[depends] += "patchelf-native:do_populate_sysroot"
71 71
72# Pass zlib/zstd link flags to the target linker wrapper via WRAPPER_TARGET_EXTRALD.
73# This ensures LLVM-using components (like rustc_codegen_llvm) can find compression libraries.
74# The wrapper will split this into separate arguments automatically.
75WRAPPER_TARGET_EXTRALD:append:class-target = " -lz -lzstd"
76
72RUSTC_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/rustc" 77RUSTC_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/rustc"
73CARGO_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/cargo" 78CARGO_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/cargo"
74RUSTC_BOOTSTRAP:class-native = "${WORKDIR}/rust-snapshot/bin/rustc" 79RUSTC_BOOTSTRAP:class-native = "${WORKDIR}/rust-snapshot/bin/rustc"