]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
rust-common: Add LDFLAGS to cc wrapper
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 25 Aug 2021 16:30:21 +0000 (17:30 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 26 Aug 2021 21:09:25 +0000 (22:09 +0100)
The -cc wrapper can be used for linking and can fail if key flags are missing:

| error: linking with `[path]/tmp/work/x86_64-linux/rust-native/1.54.0-r0/wrapper/target-rust-cc`

Add the flags to fix builds even if that is counter-intuitive (cc would
normally be used for compiling and ccld for linking).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/rust-common.bbclass

index 70f1ee0e3bdee33a773d22684b257a78aed57e1e..8bed60f2ce7ea4dea56b35db6a7a3078bc7842e7 100644 (file)
@@ -161,7 +161,7 @@ do_rust_create_wrappers () {
        create_wrapper "${RUST_BUILD_AR}" "${BUILD_AR}"
 
        # Yocto Target / Rust Target C compiler
-       create_wrapper "${RUST_TARGET_CC}" "${WRAPPER_TARGET_CC}"
+       create_wrapper "${RUST_TARGET_CC}" "${WRAPPER_TARGET_CC}" "${WRAPPER_TARGET_LDFLAGS}"
        # Yocto Target / Rust Target C++ compiler
        create_wrapper "${RUST_TARGET_CXX}" "${WRAPPER_TARGET_CXX}"
        # Yocto Target / Rust Target linker