From 1c5ab57ddda393631ce2da97ef5a876a2020d51f Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 5 Aug 2022 14:01:22 +0100 Subject: 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 --- meta/recipes-devtools/rust/rust.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc index 1c8fe225fd..d0f7467a88 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] -- cgit 1.2.3-korg