From: Benjamin Barenblat Date: Wed, 31 Aug 2022 02:54:45 +0000 (+0100) Subject: Use libatomic if necessary X-Git-Tag: archive/raspbian/20220623.1-1+rpi1+deb12u2~1^2^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b74725226c84945020763c6a4aef2842d485e46e;p=abseil.git 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. Gbp-Pq: Name latomic.diff --- diff --git a/absl/copts/AbseilConfigureCopts.cmake b/absl/copts/AbseilConfigureCopts.cmake index 73435e9..0dce69f 100644 --- a/absl/copts/AbseilConfigureCopts.cmake +++ b/absl/copts/AbseilConfigureCopts.cmake @@ -94,4 +94,8 @@ else() set(ABSL_TEST_COPTS "") endif() +list(APPEND ABSL_DEFAULT_LINKOPTS + "-Wl,--push-state,--as-needed" "-latomic" "-Wl,--pop-state" +) + set(ABSL_CXX_STANDARD "${CMAKE_CXX_STANDARD}")