From: Alberto Garcia Date: Mon, 28 May 2018 13:17:22 +0000 (+0100) Subject: Some architectures need to add -latomic explicitly X-Git-Tag: archive/raspbian/2.4.11-4+rpi1~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a800382e11edc0aad5ac4197dc2b65f70cd66929;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