From: Alberto Garcia Date: Fri, 27 Oct 2017 13:05:15 +0000 (+0100) Subject: Build wtf/Atomics.cpp only if needed X-Git-Tag: archive/raspbian/2.18.2-1+rpi1^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f2009ff1c13f44b571466b6aad5918aae1222e95;p=webkit2gtk.git Build wtf/Atomics.cpp only if needed =================================================================== Gbp-Pq: Name fix-ftbfs-armel.patch --- diff --git a/Source/WTF/wtf/CMakeLists.txt b/Source/WTF/wtf/CMakeLists.txt index 6b5e45b9ce..fcd535f3cf 100644 --- a/Source/WTF/wtf/CMakeLists.txt +++ b/Source/WTF/wtf/CMakeLists.txt @@ -205,7 +205,6 @@ set(WTF_HEADERS set(WTF_SOURCES Assertions.cpp - Atomics.cpp AutomaticThread.cpp BitVector.cpp CPUTime.cpp @@ -336,6 +335,16 @@ if (NOT USE_SYSTEM_MALLOC) list(APPEND WTF_LIBRARIES bmalloc) endif () +file(WRITE ${CMAKE_BINARY_DIR}/test_atomics.cpp + "int main(void)\n" + "{ long long x = 1; return (int) __sync_add_and_fetch_8(&x, 1); }\n") +try_compile(ATOMICS_BUILD_SUCCEEDED ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/test_atomics.cpp) +message(STATUS "Found __sync_add_and_fetch_8(): ${ATOMICS_BUILD_SUCCEEDED}") +if (NOT ATOMICS_BUILD_SUCCEEDED) + list(APPEND WTF_SOURCES Atomics.cpp) +endif () +file(REMOVE ${CMAKE_BINARY_DIR}/test_atomics.cpp) + list(APPEND WTF_SOURCES unicode/icu/CollatorICU.cpp )