From: Richard Purdie Date: Fri, 5 Aug 2022 13:01:22 +0000 (+0100) Subject: rust: Fix musl builds X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~3404 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c5ab57ddda393631ce2da97ef5a876a2020d51f;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git rust: Fix musl builds Musl targets need a sysroot set to find the musl static libraries. Set this appropriately in musl builds. Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc index 1c8fe225fd4..d0f7467a887 100644 --- a/meta/recipes-devtools/rust/rust.inc +++ b/meta/recipes-devtools/rust/rust.inc @@ -83,6 +83,8 @@ python do_configure() { config.set(host_section, "cxx", e(d.expand("${RUST_TARGET_CXX}"))) config.set(host_section, "cc", e(d.expand("${RUST_TARGET_CC}"))) + if "musl" in host_section: + config.set(host_section, "musl-root", e(d.expand("${STAGING_DIR_HOST}${exec_prefix}"))) # If we don't do this rust-native will compile it's own llvm for BUILD. # [target.${BUILD_ARCH}-unknown-linux-gnu]