From: sunilkumar.dora@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: ross.burton@arm.com, raj.khem@gmail.com,
SunilKumar.Dora@windriver.com, Sundeep.Kokkonda@windriver.com
Subject: [PATCH] libcxx: fix libunwind collision with musl builds
Date: Mon, 20 Apr 2026 15:27:42 -0700 [thread overview]
Message-ID: <20260420222742.3790348-1-sunilkumar.dora@windriver.com> (raw)
From: Sunil Dora <sunilkumar.dora@windriver.com>
Commit 75409c60 (rust: enable fully static linking with TCLIBC=musl)
used install-unwind for musl builds which also installs libunwind.so
and libunwind.h, causing a file collision with the libunwind recipe.
Only libunwind.a is needed for Rust static musl linking. Since no
other recipe in oe-core builds LLVM libunwind, compile it
unconditionally for musl and use do_install to install only the
static library.
Reported-by: Ross Burton <ross.burton@arm.com>
Suggested-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
---
meta/recipes-devtools/clang/libcxx_git.bb | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/clang/libcxx_git.bb b/meta/recipes-devtools/clang/libcxx_git.bb
index dff063ad8b..d7af23ddbc 100644
--- a/meta/recipes-devtools/clang/libcxx_git.bb
+++ b/meta/recipes-devtools/clang/libcxx_git.bb
@@ -32,9 +32,15 @@ OECMAKE_TARGET_COMPILE = "cxxabi cxx"
OECMAKE_TARGET_INSTALL = "install-cxxabi install-cxx"
# LLVM libunwind.a needed for static Rust musl builds.
-# GNU libunwind never produces .a on musl so no collision risk.
+# Install only static library to avoid collision with libunwind recipe.
OECMAKE_TARGET_COMPILE:append:libc-musl = " unwind"
-OECMAKE_TARGET_INSTALL:append:libc-musl = " install-unwind"
+
+do_install:append:libc-musl() {
+ if [ -f ${B}/lib${LLVM_LIBDIR_SUFFIX}/libunwind.a ]; then
+ install -m 0644 ${B}/lib${LLVM_LIBDIR_SUFFIX}/libunwind.a \
+ ${D}${libdir}/libunwind.a
+ fi
+}
CC = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
CXX = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
--
2.49.0
reply other threads:[~2026-04-20 22:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260420222742.3790348-1-sunilkumar.dora@windriver.com \
--to=sunilkumar.dora@windriver.com \
--cc=Sundeep.Kokkonda@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
--cc=ross.burton@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox