summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/webkit/webkitgtk/detect-atomics-during-configure.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-sato/webkit/webkitgtk/detect-atomics-during-configure.patch')
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/detect-atomics-during-configure.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-sato/webkit/webkitgtk/detect-atomics-during-configure.patch b/meta/recipes-sato/webkit/webkitgtk/detect-atomics-during-configure.patch
new file mode 100644
index 0000000000..12836f28f2
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/detect-atomics-during-configure.patch
@@ -0,0 +1,34 @@
1Taken from
2https://bugs.webkit.org/show_bug.cgi?id=161900
3
4Upstream-Status: Pending
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6
7Index: webkitgtk-2.16.1/Source/WTF/wtf/CMakeLists.txt
8===================================================================
9--- webkitgtk-2.16.1.orig/Source/WTF/wtf/CMakeLists.txt
10+++ webkitgtk-2.16.1/Source/WTF/wtf/CMakeLists.txt
11@@ -182,7 +182,6 @@ set(WTF_HEADERS
12
13 set(WTF_SOURCES
14 Assertions.cpp
15- Atomics.cpp
16 AutomaticThread.cpp
17 BitVector.cpp
18 ClockType.cpp
19@@ -301,6 +300,15 @@ if (NOT USE_SYSTEM_MALLOC)
20 list(APPEND WTF_LIBRARIES bmalloc)
21 endif ()
22
23+file(WRITE ${CMAKE_BINARY_DIR}/test_atomics.cpp
24+ "int main(void)\n"
25+ "{ long long x = 1; return (int) __sync_add_and_fetch_8(&x, 1); }\n")
26+try_compile(ATOMICS_BUILD_SUCCEEDED ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/test_atomics.cpp)
27+if (NOT ATOMICS_BUILD_SUCCEEDED)
28+ list(APPEND WTF_SOURCES Atomics.cpp)
29+endif ()
30+file(REMOVE ${CMAKE_BINARY_DIR}/test_atomics.cpp)
31+
32 list(APPEND WTF_SOURCES
33 unicode/icu/CollatorICU.cpp
34 )