commit:     467cff30d0a828868dcdc98f49afcd7d136234d5
Author:     Michal Rostecki <vadorovsky <AT> protonmail <DOT> com>
AuthorDate: Mon Oct  7 20:01:11 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 15 07:13:52 2024 +0000
URL:        https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=467cff30

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 <vadorovsky <AT> protonmail.com>
Closes: https://github.com/gentoo/crossdev/pull/23
Signed-off-by: Sam James <sam <AT> gentoo.org>

 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

Reply via email to