From 467cff30d0a828868dcdc98f49afcd7d136234d5 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Mon, 7 Oct 2024 22:01:11 +0200 Subject: crossdev: Use libunwind and libc++ in LLVM environments Avoid build issues on cross environments using musl and LLVM by using libunwind and libc++ explicitly in the clang configuration. Otherwise, clang expects GCC libunwind and libstdc++. These flags were not set explicitly in the clang configuration, because LLVM profiles were setting them, but that's not the case anymore[0]. [0] https://github.com/gentoo/gentoo/commit/5e5c9d5c524871f5af260557dbd2962b8eec5087 Bug: https://bugs.gentoo.org/941140 Signed-off-by: Michal Rostecki Closes: https://github.com/gentoo/crossdev/pull/23 Signed-off-by: Sam James --- crossdev | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crossdev b/crossdev index 1b53fd2..176bb71 100755 --- a/crossdev +++ b/crossdev @@ -1736,7 +1736,8 @@ if [[ "${LLVM}" == "yes" ]]; then --rtlib=compiler-rt --sysroot=/usr/${CTARGET} --target=${CTARGET} - --unwindlib=none + --unwindlib=libunwind + --stdlib=libc++ -fuse-ld=lld EOF # Workaround until LLVM libc supports dynamic linking and SSP -- cgit v1.2.3-65-gdbad