From: Alberto Garcia Date: Thu, 31 May 2018 17:38:40 +0000 (+0100) Subject: Some architectures need to add -latomic explicitly X-Git-Tag: archive/raspbian/2.4.11-4+rpi1~1^2~12 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=52cfeeef4bbd518912238a59c38957edb57926c0;p=webkitgtk.git Some architectures need to add -latomic explicitly =================================================================== Gbp-Pq: Name atomic_build_fix.patch --- diff --git a/Source/autotools/SetupCompilerFlags.m4 b/Source/autotools/SetupCompilerFlags.m4 index 2141818..2264cfb 100644 --- a/Source/autotools/SetupCompilerFlags.m4 +++ b/Source/autotools/SetupCompilerFlags.m4 @@ -72,3 +72,18 @@ AC_LANG_POP([C++]) if test "$has_atomic" = "no"; then LIBS="$LIBS -latomic" fi + +# Some architectures need to add libatomic explicitly +AC_LANG_PUSH([C++]) +AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include +int main() { + std::atomic i(0); + i++; + return 0; +} +]])], has_atomic=yes, has_atomic=no) +AC_LANG_POP([C++]) +if test "$has_atomic" = "no"; then + LIBS="$LIBS -latomic" +fi