summaryrefslogtreecommitdiff
path: root/debian/patches/latomic.diff
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2020-11-06 10:58:29 -0500
committerGravatar Benjamin Barenblat <bbaren@google.com>2020-11-06 16:48:06 -0500
commit8081530e824c092d36b1ef7947783c5859eb8b61 (patch)
treeac47353f082f27bf50c3239f46e966a7f0f77203 /debian/patches/latomic.diff
parentcdc399af44f560f7dd5d9b58b4be9caf1f3a7dac (diff)
Link libatomic when appropriate
Diffstat (limited to 'debian/patches/latomic.diff')
-rw-r--r--debian/patches/latomic.diff20
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/patches/latomic.diff b/debian/patches/latomic.diff
new file mode 100644
index 00000000..d78c7469
--- /dev/null
+++ b/debian/patches/latomic.diff
@@ -0,0 +1,20 @@
+From: Benjamin Barenblat <bbaren@google.com>
+Subject: Use libatomic if necessary
+Bug-Debian: https://bugs.debian.org/973492
+
+On some architectures, notably armel, Abseil needs symbols defined in
+libatomic. Abseil does not currently have a well-developed system to
+declare external library dependencies, so just have the linker determine
+if anything needs libatomic and add the DT_NEEDED entry where necessary.
+
+--- a/absl/copts/AbseilConfigureCopts.cmake
++++ b/absl/copts/AbseilConfigureCopts.cmake
+@@ -64,4 +64,8 @@
+ set(ABSL_TEST_COPTS "")
+ endif()
+
++list(APPEND ABSL_DEFAULT_LINKOPTS
++ "-Wl,--as-needed" "-latomic" "-Wl,--no-as-needed"
++)
++
+ set(ABSL_CXX_STANDARD "${CMAKE_CXX_STANDARD}")