mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 18:32:20 +02:00
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>
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
From 40520b0de69d8ca8e659248f5ffe641f33cc6dee Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 9 Mar 2021 14:16:58 -0800
|
||||
Subject: [PATCH] Extend atomics check to include 1-byte CAS test
|
||||
|
||||
Rename ATOMIC_INT64_REQUIRES_LIBATOMIC to ATOMICS_REQUIRE_LIBATOMIC so
|
||||
it can reflect broader range which is now checked
|
||||
|
||||
Rename ATOMIC_INT64_IS_BUILTIN to ATOMICS_ARE_BUILTIN
|
||||
|
||||
Upstream-Status: Submitted [https://bugs.webkit.org/attachment.cgi?bugid=222959]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Source/JavaScriptCore/CMakeLists.txt | 2 +-
|
||||
Source/WebKit/CMakeLists.txt | 2 +-
|
||||
Source/cmake/WebKitCompilerFlags.cmake | 15 ++++++++++-----
|
||||
3 files changed, 12 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/Source/JavaScriptCore/CMakeLists.txt
|
||||
+++ b/Source/JavaScriptCore/CMakeLists.txt
|
||||
@@ -129,7 +129,7 @@ if (USE_CAPSTONE)
|
||||
list(APPEND JavaScriptCore_LIBRARIES capstone)
|
||||
endif ()
|
||||
|
||||
-if (ATOMIC_INT64_REQUIRES_LIBATOMIC)
|
||||
+if (ATOMICS_REQUIRE_LIBATOMIC)
|
||||
list(APPEND JavaScriptCore_LIBRARIES atomic)
|
||||
endif ()
|
||||
|
||||
--- a/Source/WebKit/CMakeLists.txt
|
||||
+++ b/Source/WebKit/CMakeLists.txt
|
||||
@@ -337,7 +337,7 @@ if (USE_LIBWEBRTC)
|
||||
list(APPEND WebKit_LIBRARIES webrtc)
|
||||
endif ()
|
||||
|
||||
-if (ATOMIC_INT64_REQUIRES_LIBATOMIC)
|
||||
+if (ATOMICS_REQUIRE_LIBATOMIC)
|
||||
list(APPEND WebKit_PRIVATE_LIBRARIES atomic)
|
||||
endif ()
|
||||
|
||||
--- a/Source/cmake/WebKitCompilerFlags.cmake
|
||||
+++ b/Source/cmake/WebKitCompilerFlags.cmake
|
||||
@@ -280,12 +280,17 @@ endif ()
|
||||
if (COMPILER_IS_GCC_OR_CLANG)
|
||||
set(ATOMIC_TEST_SOURCE "
|
||||
#include <atomic>
|
||||
- int main() { std::atomic<int64_t> i(0); i++; return 0; }
|
||||
+ int main() {
|
||||
+ std::atomic<int64_t> i(0);
|
||||
+ std::atomic<int8_t> j(0);
|
||||
+ i++; j++;
|
||||
+ return 0;
|
||||
+ }
|
||||
")
|
||||
- check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMIC_INT64_IS_BUILTIN)
|
||||
- if (NOT ATOMIC_INT64_IS_BUILTIN)
|
||||
+ check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMICS_ARE_BUILTIN)
|
||||
+ if (NOT ATOMICS_ARE_BUILTIN)
|
||||
set(CMAKE_REQUIRED_LIBRARIES atomic)
|
||||
- check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMIC_INT64_REQUIRES_LIBATOMIC)
|
||||
+ check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMICS_REQUIRE_LIBATOMIC)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
endif ()
|
||||
endif ()
|
||||
--- a/Source/WTF/wtf/CMakeLists.txt
|
||||
+++ b/Source/WTF/wtf/CMakeLists.txt
|
||||
@@ -529,6 +529,10 @@ list(APPEND WTF_LIBRARIES
|
||||
ICU::uc
|
||||
)
|
||||
|
||||
+if (ATOMICS_REQUIRE_LIBATOMIC)
|
||||
+ list(APPEND WTF_LIBRARIES atomic)
|
||||
+endif ()
|
||||
+
|
||||
set(WTF_INTERFACE_LIBRARIES WTF)
|
||||
set(WTF_INTERFACE_INCLUDE_DIRECTORIES ${WTF_FRAMEWORK_HEADERS_DIR})
|
||||
set(WTF_INTERFACE_DEPENDENCIES WTF_CopyHeaders)
|
||||
@@ -19,7 +19,9 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
|
||||
file://include_array.patch \
|
||||
file://include_xutil.patch \
|
||||
file://reduce-memory-overheads.patch \
|
||||
file://0001-Extend-atomics-check-to-include-1-byte-CAS-test.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "7d0dab08e3c5ae07bec80b2822ef42e952765d5724cac86eb23999bfed5a7f1f"
|
||||
|
||||
inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gtk-doc
|
||||
|
||||
Reference in New Issue
Block a user