From d907ac649ff5514826af9ad7e97e15dfcf79909c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 17 May 2017 22:34:24 -0700 Subject: [PATCH] webkitgtk: Fix build for armv5 Taken from https://bugs.webkit.org/show_bug.cgi?id=161900 Upstream-Status: Pending Signed-off-by: Khem Raj --- Source/WTF/wtf/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/WTF/wtf/CMakeLists.txt b/Source/WTF/wtf/CMakeLists.txt index 220bafd..4e1e9f8 100644 --- a/Source/WTF/wtf/CMakeLists.txt +++ b/Source/WTF/wtf/CMakeLists.txt @@ -315,7 +315,6 @@ set(WTF_HEADERS set(WTF_SOURCES Assertions.cpp - Atomics.cpp AutomaticThread.cpp BitVector.cpp CPUTime.cpp @@ -458,6 +457,15 @@ 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) +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/CollatorDefault.cpp