Title: [197557] releases/WebKitGTK/webkit-2.4/Source
Revision
197557
Author
[email protected]
Date
2016-03-04 04:57:48 -0800 (Fri, 04 Mar 2016)

Log Message

Merge r176519 - Webkit2 doesnt build on powerpc 32 bits
https://bugs.webkit.org/show_bug.cgi?id=130837

Reviewed by Carlos Garcia Campos.

Check if libatomic is needed in order to use std::atomic, and add
it to the list of WebKit2 libraries.

* PlatformGTK.cmake:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.4/Source/WebKit2/ChangeLog (197556 => 197557)


--- releases/WebKitGTK/webkit-2.4/Source/WebKit2/ChangeLog	2016-03-04 12:54:39 UTC (rev 197556)
+++ releases/WebKitGTK/webkit-2.4/Source/WebKit2/ChangeLog	2016-03-04 12:57:48 UTC (rev 197557)
@@ -1,3 +1,15 @@
+2014-11-24  Alberto Garcia  <[email protected]>
+
+        Webkit2 doesnt build on powerpc 32 bits
+        https://bugs.webkit.org/show_bug.cgi?id=130837
+
+        Reviewed by Carlos Garcia Campos.
+
+        Check if libatomic is needed in order to use std::atomic, and add
+        it to the list of WebKit2 libraries.
+
+        * PlatformGTK.cmake:
+
 2015-04-17  Milan Crha  <[email protected]>
 
         [GTK] Expand wildcards inside generate-inspector-gresource-manifest.py

Modified: releases/WebKitGTK/webkit-2.4/Source/WebKit2/PlatformGTK.cmake (197556 => 197557)


--- releases/WebKitGTK/webkit-2.4/Source/WebKit2/PlatformGTK.cmake	2016-03-04 12:54:39 UTC (rev 197556)
+++ releases/WebKitGTK/webkit-2.4/Source/WebKit2/PlatformGTK.cmake	2016-03-04 12:57:48 UTC (rev 197557)
@@ -445,6 +445,15 @@
     unix/NetworkMainUnix.cpp
 )
 
+file(WRITE ${CMAKE_BINARY_DIR}/test_atomic.cpp
+     "#include <atomic>\n"
+     "int main() { std::atomic<int64_t> i(0); i++; return 0; }\n")
+try_compile(ATOMIC_BUILD_SUCCEEDED ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/test_atomic.cpp)
+if (NOT ATOMIC_BUILD_SUCCEEDED)
+    list(APPEND WebKit2_LIBRARIES atomic)
+endif ()
+file(REMOVE ${CMAKE_BINARY_DIR}/test_atomic.cpp)
+
 set(SharedWebKit2Libraries
     ${WebKit2_LIBRARIES}
 )

Modified: releases/WebKitGTK/webkit-2.4/Source/autotools/SetupCompilerFlags.m4 (197556 => 197557)


--- releases/WebKitGTK/webkit-2.4/Source/autotools/SetupCompilerFlags.m4	2016-03-04 12:54:39 UTC (rev 197556)
+++ releases/WebKitGTK/webkit-2.4/Source/autotools/SetupCompilerFlags.m4	2016-03-04 12:57:48 UTC (rev 197557)
@@ -57,3 +57,18 @@
     CXXFLAGS="$CXXFLAGS -O0"
     CFLAGS="$CFLAGS -O0"
 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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to