From: Alberto Garcia Date: Fri, 2 Sep 2016 08:18:33 +0000 (+0000) Subject: Some architectures need to add -latomic explicitly X-Git-Tag: archive/raspbian/2.4.11-4+rpi1~1^2^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=efa2c8d21ee7b655d796e18a5e2f13b4b35e2419;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