forked from pool/webkit2gtk3
Dominique Leuenberger
8aaeea8f4b
- webkitgtk-libatomic.patch: Check if libatomic is needed in order to use std::atomic, fixes build on ppc OBS-URL: https://build.opensuse.org/request/show/281038 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/webkit2gtk3?expand=0&rev=17
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
2014-11-20 Alberto Garcia <berto@igalia.com>
|
|
|
|
Webkit2 doesnt build on powerpc 32 bits
|
|
https://bugs.webkit.org/show_bug.cgi?id=130837
|
|
|
|
Reviewed by NOBODY (OOPS!).
|
|
|
|
Check if libatomic is needed in order to use std::atomic, and add
|
|
it to the list of WebKit2 libraries.
|
|
|
|
* PlatformGTK.cmake:
|
|
|
|
diff --git a/Source/WebKit2/PlatformGTK.cmake b/Source/WebKit2/PlatformGTK.cmake
|
|
index 954aa0e..298ec7c 100644
|
|
--- a/Source/WebKit2/PlatformGTK.cmake
|
|
+++ b/Source/WebKit2/PlatformGTK.cmake
|
|
@@ -467,6 +467,15 @@ list(APPEND NetworkProcess_SOURCES
|
|
NetworkProcess/EntryPoint/unix/NetworkProcessMain.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}
|
|
)
|