2014-11-20 Alberto Garcia 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 \n" + "int main() { std::atomic 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} )