diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-06-09 19:57:03 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-09-08 09:08:54 -0700 |
commit | 1231a40c5002023c1facca292bfb2be8b6fac4f2 (patch) | |
tree | 44bb82710013050dd90870e496389b9d31046d58 | |
parent | 7955c9325732489c2777db8010eda99fdb851eb5 (diff) | |
download | meta-clang-1231a40c5002023c1facca292bfb2be8b6fac4f2.tar.gz |
nonclangable: Use libgcc for unwinder as well when using for builtins
clang 13 does not like to mix rtlib and unwindlib when using libgcc
Fixes
clang-13: error: --rtlib=libgcc requires --unwindlib=libgcc
secondly compiler-rt does not havw 128 bit ( tf ) functions
on x86 so fallback to libgcc for those
use libatomic for x86 since 64bit atomics are not in compiler-rt
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 96face19ae51510d5e5923e575496844b5b85e62)
-rw-r--r-- | conf/nonclangable.conf | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index e282de8..1058dc6 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf | |||
@@ -268,23 +268,25 @@ COMPILER_RT_pn-qtbase_toolchain-clang_riscv32 = "-rtlib=compiler-rt ${UNWINDLIB} | |||
268 | LDFLAGS_append_pn-gnutls_toolchain-clang_riscv64 = " -latomic" | 268 | LDFLAGS_append_pn-gnutls_toolchain-clang_riscv64 = " -latomic" |
269 | LDFLAGS_append_pn-harfbuzz_toolchain-clang_riscv64 = " -latomic" | 269 | LDFLAGS_append_pn-harfbuzz_toolchain-clang_riscv64 = " -latomic" |
270 | LDFLAGS_append_pn-qtwebengine_toolchain-clang_runtime-gnu_x86 = " -latomic" | 270 | LDFLAGS_append_pn-qtwebengine_toolchain-clang_runtime-gnu_x86 = " -latomic" |
271 | LDFLAGS_append_pn-qemu_toolchain-clang_runtime-gnu_x86 = " -latomic" | 271 | LDFLAGS_append_pn-qemu_toolchain-clang_x86 = " -latomic" |
272 | 272 | ||
273 | # glibc is built with gcc and hence encodes some libgcc specific builtins which are not found | 273 | # glibc is built with gcc and hence encodes some libgcc specific builtins which are not found |
274 | # when doing static linking with clang using compiler-rt, so use libgcc | 274 | # when doing static linking with clang using compiler-rt, so use libgcc |
275 | # undefined reference to `__unordtf2' | 275 | # undefined reference to `__unordtf2' |
276 | COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc" | 276 | COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" |
277 | COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc" | 277 | COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" |
278 | COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc" | 278 | COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" |
279 | COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc" | 279 | COMPILER_RT_pn-libc-bench_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" |
280 | COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc" | 280 | COMPILER_RT_pn-mpich_libc-glibc_toolchain-clang_x86 = "-rtlib=libgcc --unwindlib=libgcc" |
281 | COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc" | 281 | COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc --unwindlib=libgcc" |
282 | COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc --unwindlib=libgcc" | ||
283 | COMPILER_RT_pn-tsocks_libc-glibc_toolchain-clang_x86-64 = "-rtlib=libgcc --unwindlib=libgcc" | ||
282 | 284 | ||
283 | #(unwind.o): in function `__pthread_unwind': | 285 | #(unwind.o): in function `__pthread_unwind': |
284 | #/usr/src/debug/glibc/2.29-r0/git/nptl/unwind.c:121: undefined reference to `_Unwind_ForcedUnwind' | 286 | #/usr/src/debug/glibc/2.29-r0/git/nptl/unwind.c:121: undefined reference to `_Unwind_ForcedUnwind' |
285 | #clang-8: error: linker command failed with exit code 1 (use -v to see invocation) | 287 | #clang-8: error: linker command failed with exit code 1 (use -v to see invocation) |
286 | COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc" | 288 | COMPILER_RT_pn-aufs-util_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc --unwindlib=libgcc" |
287 | COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc" | 289 | COMPILER_RT_pn-libhugetlbfs_libc-glibc_toolchain-clang_arm = "-rtlib=libgcc --unwindlib=libgcc" |
288 | 290 | ||
289 | # Uses gcc for native tools, e.g. nsinstall and passes clang options which fails so | 291 | # Uses gcc for native tools, e.g. nsinstall and passes clang options which fails so |
290 | # let same compiler ( gcc or clang) be native/cross compiler | 292 | # let same compiler ( gcc or clang) be native/cross compiler |