summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-03-09 14:40:57 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-10 10:30:39 +0000
commit90a39ca9f4ce845aff84eeda1165f49e98c88315 (patch)
tree5127e80a97fe7c15e9cc6156cb9462632e265630 /meta
parenta42b2bf96e2e78f8e79a25cf445b0a7bb3d89e5e (diff)
downloadpoky-90a39ca9f4ce845aff84eeda1165f49e98c88315.tar.gz
webkitgtk: Enhance check for atomics to include 1 byte CAS
This fixes linking failures Source/WTF/wtf/text/StringImpl.h:1115: undefined reference to `__atomic_compare_exchange_1' (From OE-Core rev: 22cb3fff5a161f03511056c749bfb11e83de1628) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/0001-Extend-atomics-check-to-include-1-byte-CAS-test.patch77
-rw-r--r--meta/recipes-sato/webkit/webkitgtk_2.30.5.bb2
2 files changed, 79 insertions, 0 deletions
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Extend-atomics-check-to-include-1-byte-CAS-test.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Extend-atomics-check-to-include-1-byte-CAS-test.patch
new file mode 100644
index 0000000000..93bda4d754
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-Extend-atomics-check-to-include-1-byte-CAS-test.patch
@@ -0,0 +1,77 @@
1From 40520b0de69d8ca8e659248f5ffe641f33cc6dee Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 9 Mar 2021 14:16:58 -0800
4Subject: [PATCH] Extend atomics check to include 1-byte CAS test
5
6Rename ATOMIC_INT64_REQUIRES_LIBATOMIC to ATOMICS_REQUIRE_LIBATOMIC so
7it can reflect broader range which is now checked
8
9Rename ATOMIC_INT64_IS_BUILTIN to ATOMICS_ARE_BUILTIN
10
11Upstream-Status: Submitted [https://bugs.webkit.org/attachment.cgi?bugid=222959]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 Source/JavaScriptCore/CMakeLists.txt | 2 +-
15 Source/WebKit/CMakeLists.txt | 2 +-
16 Source/cmake/WebKitCompilerFlags.cmake | 15 ++++++++++-----
17 3 files changed, 12 insertions(+), 7 deletions(-)
18
19--- a/Source/JavaScriptCore/CMakeLists.txt
20+++ b/Source/JavaScriptCore/CMakeLists.txt
21@@ -129,7 +129,7 @@ if (USE_CAPSTONE)
22 list(APPEND JavaScriptCore_LIBRARIES capstone)
23 endif ()
24
25-if (ATOMIC_INT64_REQUIRES_LIBATOMIC)
26+if (ATOMICS_REQUIRE_LIBATOMIC)
27 list(APPEND JavaScriptCore_LIBRARIES atomic)
28 endif ()
29
30--- a/Source/WebKit/CMakeLists.txt
31+++ b/Source/WebKit/CMakeLists.txt
32@@ -337,7 +337,7 @@ if (USE_LIBWEBRTC)
33 list(APPEND WebKit_LIBRARIES webrtc)
34 endif ()
35
36-if (ATOMIC_INT64_REQUIRES_LIBATOMIC)
37+if (ATOMICS_REQUIRE_LIBATOMIC)
38 list(APPEND WebKit_PRIVATE_LIBRARIES atomic)
39 endif ()
40
41--- a/Source/cmake/WebKitCompilerFlags.cmake
42+++ b/Source/cmake/WebKitCompilerFlags.cmake
43@@ -280,12 +280,17 @@ endif ()
44 if (COMPILER_IS_GCC_OR_CLANG)
45 set(ATOMIC_TEST_SOURCE "
46 #include <atomic>
47- int main() { std::atomic<int64_t> i(0); i++; return 0; }
48+ int main() {
49+ std::atomic<int64_t> i(0);
50+ std::atomic<int8_t> j(0);
51+ i++; j++;
52+ return 0;
53+ }
54 ")
55- check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMIC_INT64_IS_BUILTIN)
56- if (NOT ATOMIC_INT64_IS_BUILTIN)
57+ check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMICS_ARE_BUILTIN)
58+ if (NOT ATOMICS_ARE_BUILTIN)
59 set(CMAKE_REQUIRED_LIBRARIES atomic)
60- check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMIC_INT64_REQUIRES_LIBATOMIC)
61+ check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMICS_REQUIRE_LIBATOMIC)
62 unset(CMAKE_REQUIRED_LIBRARIES)
63 endif ()
64 endif ()
65--- a/Source/WTF/wtf/CMakeLists.txt
66+++ b/Source/WTF/wtf/CMakeLists.txt
67@@ -529,6 +529,10 @@ list(APPEND WTF_LIBRARIES
68 ICU::uc
69 )
70
71+if (ATOMICS_REQUIRE_LIBATOMIC)
72+ list(APPEND WTF_LIBRARIES atomic)
73+endif ()
74+
75 set(WTF_INTERFACE_LIBRARIES WTF)
76 set(WTF_INTERFACE_INCLUDE_DIRECTORIES ${WTF_FRAMEWORK_HEADERS_DIR})
77 set(WTF_INTERFACE_DEPENDENCIES WTF_CopyHeaders)
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.30.5.bb b/meta/recipes-sato/webkit/webkitgtk_2.30.5.bb
index a1dd76ce81..d0a41f48c7 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.30.5.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.30.5.bb
@@ -19,7 +19,9 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
19 file://include_array.patch \ 19 file://include_array.patch \
20 file://include_xutil.patch \ 20 file://include_xutil.patch \
21 file://reduce-memory-overheads.patch \ 21 file://reduce-memory-overheads.patch \
22 file://0001-Extend-atomics-check-to-include-1-byte-CAS-test.patch \
22 " 23 "
24
23SRC_URI[sha256sum] = "7d0dab08e3c5ae07bec80b2822ef42e952765d5724cac86eb23999bfed5a7f1f" 25SRC_URI[sha256sum] = "7d0dab08e3c5ae07bec80b2822ef42e952765d5724cac86eb23999bfed5a7f1f"
24 26
25inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gtk-doc 27inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gtk-doc