diff options
| -rw-r--r-- | meta/recipes-sato/webkit/webkitgtk/0001-Extend-atomics-check-to-include-1-byte-CAS-test.patch | 77 | ||||
| -rw-r--r-- | meta/recipes-sato/webkit/webkitgtk_2.30.5.bb | 2 |
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 @@ | |||
| 1 | From 40520b0de69d8ca8e659248f5ffe641f33cc6dee Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 9 Mar 2021 14:16:58 -0800 | ||
| 4 | Subject: [PATCH] Extend atomics check to include 1-byte CAS test | ||
| 5 | |||
| 6 | Rename ATOMIC_INT64_REQUIRES_LIBATOMIC to ATOMICS_REQUIRE_LIBATOMIC so | ||
| 7 | it can reflect broader range which is now checked | ||
| 8 | |||
| 9 | Rename ATOMIC_INT64_IS_BUILTIN to ATOMICS_ARE_BUILTIN | ||
| 10 | |||
| 11 | Upstream-Status: Submitted [https://bugs.webkit.org/attachment.cgi?bugid=222959] | ||
| 12 | Signed-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 | |||
| 23 | SRC_URI[sha256sum] = "7d0dab08e3c5ae07bec80b2822ef42e952765d5724cac86eb23999bfed5a7f1f" | 25 | SRC_URI[sha256sum] = "7d0dab08e3c5ae07bec80b2822ef42e952765d5724cac86eb23999bfed5a7f1f" |
| 24 | 26 | ||
| 25 | inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gtk-doc | 27 | inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gtk-doc |
