[llvm-dev] compiler-rt linking failure on linux-sparcv9
John Paul Adrian Glaubitz via llvm-dev
llvm-dev at lists.llvm.org
Wed Oct 21 11:19:52 PDT 2020
Hi!
The build on linux-sparcv9 has recently started to fail with a linker failure that looks easy to
fix but so far I've been unable to find out where to include the necessary -latomic [1]:
/usr/bin/ld: warning: -z gnu-version-script-compat ignored
/usr/bin/ld: projects/compiler-rt/lib/asan/CMakeFiles/RTAsan_dynamic.sparc.dir/asan_allocator.cpp.o: in function `__sanitizer::atomic_uint64_t::Type __sanitizer::atomic_load<__sanitizer::atomic_uint64_t>(__sanitizer::atomic_uint64_t const volatile*, __sanitizer::memory_order)':
/home/glaubitz/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_atomic_clang_other.h:56: undefined reference to `__sync_fetch_and_add_8'
/usr/bin/ld: /home/glaubitz/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_atomic_clang_other.h:56: undefined reference to `__sync_fetch_and_add_8'
/usr/bin/ld: /home/glaubitz/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_atomic_clang_other.h:56: undefined reference to `__sync_fetch_and_add_8'
/usr/bin/ld: /home/glaubitz/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_atomic_clang_other.h:56: undefined reference to `__sync_fetch_and_add_8'
/usr/bin/ld: /home/glaubitz/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_atomic_clang_other.h:56: undefined reference to `__sync_fetch_and_add_8'
/usr/bin/ld: projects/compiler-rt/lib/asan/CMakeFiles/RTAsan_dynamic.sparc.dir/asan_allocator.cpp.o:/home/glaubitz/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_atomic_clang_other.h:56: more undefined references to `__sync_fetch_and_add_8' follow
/usr/bin/ld: projects/compiler-rt/lib/asan/CMakeFiles/RTAsan_dynamic.sparc.dir/asan_allocator.cpp.o: in function `void __sanitizer::atomic_store<__sanitizer::atomic_uint64_t>(__sanitizer::atomic_uint64_t volatile*, __sanitizer::atomic_uint64_t::Type, __sanitizer::memory_order)':
/home/glaubitz/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_atomic_clang_other.h:87: undefined reference to `__sync_val_compare_and_swap_8'
/usr/bin/ld: /home/glaubitz/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_atomic_clang_other.h:87: undefined reference to `__sync_val_compare_and_swap_8'
/usr/bin/ld: /home/glaubitz/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_atomic_clang_other.h:87: undefined reference to `__sync_val_compare_and_swap_8'
/usr/bin/ld: /home/glaubitz/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_atomic_clang_other.h:87: undefined reference to `__sync_val_compare_and_swap_8'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Does anyone have any suggestion where to add the necessary linker flags?
Full build log in [1].
Adrian
> [1] https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-snapshot&arch=sparc64&ver=1%3A12%7E%2B%2B20200929085817%2B962a247aebb-1%7Eexp1&stamp=1603274506&raw=0
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz at debian.org
`. `' Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
More information about the llvm-dev
mailing list