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