1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
From: Alberto Garcia <berto@igalia.com>
Subject: Some architectures need to add -latomic explicitly
Index: webkitgtk/Source/autotools/SetupCompilerFlags.m4
===================================================================
--- webkitgtk.orig/Source/autotools/SetupCompilerFlags.m4
+++ webkitgtk/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 <atomic>
+int main() {
+ std::atomic<int64_t> 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
|