lld-use-link-atomic-i386.diff Try to workaround a linker error error: undefined reference to '__atomic_load' on sid i386

This commit is contained in:
Sylvestre Ledru 2020-10-21 11:35:15 +02:00
parent 1b34f660af
commit 14a788cc48
3 changed files with 24 additions and 0 deletions

3
debian/changelog vendored
View File

@ -1,6 +1,9 @@
llvm-toolchain-snapshot (1:12~++20201019021526+5a8ac3cc63d-1~exp1) UNRELEASED; urgency=medium
* experimental New snapshot release
* lld-use-link-atomic-i386.diff Try to workaround a linker error
error: undefined reference to '__atomic_load'
on sid i386
-- Sylvestre Ledru <sylvestre@debian.org> Mon, 19 Oct 2020 14:19:16 +0200

View File

@ -0,0 +1,20 @@
Index: llvm-toolchain-11-11.0.0/lld/tools/lld/CMakeLists.txt
===================================================================
--- llvm-toolchain-11-11.0.0.orig/lld/tools/lld/CMakeLists.txt
+++ llvm-toolchain-11-11.0.0/lld/tools/lld/CMakeLists.txt
@@ -2,9 +2,14 @@ set(LLVM_LINK_COMPONENTS
Support
)
+if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i386" OR
+ CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i686")
+ list(APPEND LLD_ATOMIC_LIB "atomic")
+endif()
+
add_lld_tool(lld
lld.cpp
-
+ ${LLD_ATOMIC_LIB}
SUPPORT_PLUGINS
)
export_executable_symbols_for_plugins(lld)

View File

@ -132,3 +132,4 @@ disable-fuzzer-compiler-rt-x86.diff
python3-shebang.patch
print-lldb-path.patch
libcxx-armhf-ftbfs.diff
lld-use-link-atomic-i386.diff