From 14a788cc48dde6811702c7ad1bb32579d3bcc90c Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 21 Oct 2020 11:35:15 +0200 Subject: [PATCH] lld-use-link-atomic-i386.diff Try to workaround a linker error error: undefined reference to '__atomic_load' on sid i386 --- debian/changelog | 3 +++ debian/patches/lld-use-link-atomic-i386.diff | 20 ++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 24 insertions(+) create mode 100644 debian/patches/lld-use-link-atomic-i386.diff diff --git a/debian/changelog b/debian/changelog index b42db017..c5c2d8d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 19 Oct 2020 14:19:16 +0200 diff --git a/debian/patches/lld-use-link-atomic-i386.diff b/debian/patches/lld-use-link-atomic-i386.diff new file mode 100644 index 00000000..c5e17a11 --- /dev/null +++ b/debian/patches/lld-use-link-atomic-i386.diff @@ -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) diff --git a/debian/patches/series b/debian/patches/series index a73a720c..823b051a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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