diff options
Diffstat (limited to 'meta/recipes-sato/webkit/webkitgtk')
16 files changed, 282 insertions, 330 deletions
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch new file mode 100644 index 0000000000..ca7b1bca48 --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch @@ -0,0 +1,42 @@ +From b145ab4273c59f4f908cdaff9e267241bd970e93 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 3 Feb 2020 17:06:27 -0800 +Subject: [PATCH] Enable THREADS_PREFER_PTHREAD_FLAG + +Fixes build failures on risv64 + +Taken from https://trac.webkit.org/changeset/231843/webkit + + Enable THREADS_PREFER_PTHREAD_FLAG. This uses -pthread instead of +-lpthread, fixing the 64-bit RISC-V build of the GTK+ port due to +missing atomic primitives. + +Upstream-Status: Submitted [https://trac.webkit.org/changeset/231843/webkit] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + Source/cmake/OptionsGTK.cmake | 1 + + Source/cmake/OptionsJSCOnly.cmake | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake +index 8732e935..9b4fbae7 100644 +--- a/Source/cmake/OptionsGTK.cmake ++++ b/Source/cmake/OptionsGTK.cmake +@@ -32,6 +32,7 @@ set(USER_AGENT_BRANDING "" CACHE STRING "Branding to add to user agent string") + if (USER_AGENT_BRANDING) + add_definitions(-DUSER_AGENT_BRANDING="${USER_AGENT_BRANDING}") + endif () ++set(THREADS_PREFER_PTHREAD_FLAG ON) + + find_package(Cairo 1.14.0 REQUIRED) + find_package(Fontconfig 2.8.0 REQUIRED) +diff --git a/Source/cmake/OptionsJSCOnly.cmake b/Source/cmake/OptionsJSCOnly.cmake +index 316c6240..2f712602 100644 +--- a/Source/cmake/OptionsJSCOnly.cmake ++++ b/Source/cmake/OptionsJSCOnly.cmake +@@ -1,3 +1,4 @@ ++set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + + if (MSVC) 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 @@ +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) diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-musl.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-musl.patch index 0c145c7ebd..a13b394fd9 100644 --- a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-musl.patch +++ b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-musl.patch @@ -1,4 +1,4 @@ -From c4d4d9f1aa74addefdad40294cf16d9e0b3dd6ec Mon Sep 17 00:00:00 2001 +From 828a500d5be62ba6fc94bd4fac3fe4bf1b1d4f6d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 6 Oct 2017 17:00:08 +0300 Subject: [PATCH] Fix build with musl @@ -8,14 +8,12 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- Source/JavaScriptCore/runtime/MachineContext.h | 10 +++++----- - Source/WTF/wtf/Platform.h | 2 +- + Source/WTF/wtf/PlatformHave.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) -diff --git a/Source/JavaScriptCore/runtime/MachineContext.h b/Source/JavaScriptCore/runtime/MachineContext.h -index 823964c2..00841146 100644 --- a/Source/JavaScriptCore/runtime/MachineContext.h +++ b/Source/JavaScriptCore/runtime/MachineContext.h -@@ -188,7 +188,7 @@ static inline void*& stackPointerImpl(mcontext_t& machineContext) +@@ -196,7 +196,7 @@ static inline void*& stackPointerImpl(mc #error Unknown Architecture #endif @@ -24,7 +22,7 @@ index 823964c2..00841146 100644 #if CPU(X86) return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_ESP]); -@@ -335,7 +335,7 @@ static inline void*& framePointerImpl(mcontext_t& machineContext) +@@ -347,7 +347,7 @@ static inline void*& framePointerImpl(mc #error Unknown Architecture #endif @@ -33,7 +31,7 @@ index 823964c2..00841146 100644 // The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) -@@ -482,7 +482,7 @@ static inline void*& instructionPointerImpl(mcontext_t& machineContext) +@@ -498,7 +498,7 @@ static inline void*& instructionPointerI #error Unknown Architecture #endif @@ -42,7 +40,7 @@ index 823964c2..00841146 100644 // The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) -@@ -639,7 +639,7 @@ inline void*& argumentPointer<1>(mcontext_t& machineContext) +@@ -656,7 +656,7 @@ inline void*& argumentPointer<1>(mcontex #error Unknown Architecture #endif @@ -51,7 +49,7 @@ index 823964c2..00841146 100644 // The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) -@@ -756,7 +756,7 @@ inline void*& llintInstructionPointer(mcontext_t& machineContext) +@@ -773,7 +773,7 @@ inline void*& llintInstructionPointer(mc #error Unknown Architecture #endif @@ -60,16 +58,34 @@ index 823964c2..00841146 100644 // The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) -diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h -index 34f7cb14..32ad9150 100644 ---- a/Source/WTF/wtf/Platform.h -+++ b/Source/WTF/wtf/Platform.h -@@ -714,7 +714,7 @@ - - #endif /* OS(DARWIN) */ +--- a/Source/WTF/wtf/PlatformHave.h ++++ b/Source/WTF/wtf/PlatformHave.h +@@ -202,7 +202,7 @@ + #define HAVE_HOSTED_CORE_ANIMATION 1 + #endif -#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || defined(__GLIBC__) || defined(__BIONIC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS))) +#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || defined(__linux__) || defined(__BIONIC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS))) #define HAVE_MACHINE_CONTEXT 1 #endif +--- a/Source/WebCore/xml/XPathGrammar.cpp ++++ b/Source/WebCore/xml/XPathGrammar.cpp +@@ -966,7 +966,7 @@ int yydebug; + #if YYERROR_VERBOSE + + # ifndef yystrlen +-# if defined __GLIBC__ && defined _STRING_H ++# if defined __linux__ && defined _STRING_H + # define yystrlen strlen + # else + /* Return the length of YYSTR. */ +@@ -989,7 +989,7 @@ yystrlen (yystr) + # endif + + # ifndef yystpcpy +-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE ++# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE + # define yystpcpy stpcpy + # else + /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch index aa9a06701a..0c31c5fa21 100644 --- a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch +++ b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch @@ -1,4 +1,4 @@ -From 0afc194c6446e6c3242f1d706b4564e3a9cb2cee Mon Sep 17 00:00:00 2001 +From 4718888071e29deb8b245b88c81577fd5bac4e5e Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Mon, 29 Aug 2016 16:38:11 +0300 Subject: [PATCH] Fix racy parallel build of WebKit2-4.0.gir @@ -11,12 +11,12 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake -index a074a80..8c6ebb5 100644 +index a069c5f6..ea2f542b 100644 --- a/Source/WebKit/PlatformGTK.cmake +++ b/Source/WebKit/PlatformGTK.cmake -@@ -728,8 +728,9 @@ if (ENABLE_INTROSPECTION) - string(REGEX MATCHALL "-L[^ ]*" - INTROSPECTION_ADDITIONAL_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") +@@ -650,8 +650,9 @@ if (ENABLE_INTROSPECTION) + set(GIR_SOURCES_TOP_DIRS "--sources-top-dirs=${CMAKE_BINARY_DIR}") + endif () - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir @@ -26,7 +26,7 @@ index a074a80..8c6ebb5 100644 DEPENDS WebKit DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS= -@@ -773,7 +774,7 @@ if (ENABLE_INTROSPECTION) +@@ -699,7 +700,7 @@ if (ENABLE_INTROSPECTION) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir @@ -35,7 +35,7 @@ index a074a80..8c6ebb5 100644 COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}" ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}" -@@ -828,7 +829,7 @@ if (ENABLE_INTROSPECTION) +@@ -761,7 +762,7 @@ if (ENABLE_INTROSPECTION) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch b/meta/recipes-sato/webkit/webkitgtk/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch deleted file mode 100644 index e8d1d8c341..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch +++ /dev/null @@ -1,35 +0,0 @@ -From bed4cf4aaa6aad4172ec9942e9039fb8e1ef68a4 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Mon, 29 Feb 2016 18:13:39 +0200 -Subject: [PATCH] OptionsGTK.cmake: drop the hardcoded introspection/gtkdoc - disabling when cross-compiling - -This was not possible to override from the command line and in OpenEmbedded -(one of the most prominent cross-compilation frameworks) introspection does work fine, -through the use of qemu target emulation. - -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - -Upstream-Status: Pending - ---- - Source/cmake/OptionsGTK.cmake | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake -index 661b40e..404441b 100644 ---- a/Source/cmake/OptionsGTK.cmake -+++ b/Source/cmake/OptionsGTK.cmake -@@ -352,12 +352,6 @@ if (ENABLED_COMPILER_SANITIZERS) - set(ENABLE_INTROSPECTION OFF) - endif () - --# Override the cached variables, gtk-doc and gobject-introspection do not really work when cross-building. --if (CMAKE_CROSSCOMPILING) -- set(ENABLE_GTKDOC OFF) -- set(ENABLE_INTROSPECTION OFF) --endif () -- - # Override the cached variable, gtk-doc does not really work when building on Mac. - if (APPLE) - set(ENABLE_GTKDOC OFF) diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch index e7c668c040..866e9d9d09 100644 --- a/meta/recipes-sato/webkit/webkitgtk/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch +++ b/meta/recipes-sato/webkit/webkitgtk/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch @@ -1,4 +1,4 @@ -From 4b5e02212a31b82fc9b3becad90542274816fc29 Mon Sep 17 00:00:00 2001 +From 1c7e7a385387d7febf633bbb6d2b99ece523e719 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Thu, 11 Aug 2016 17:13:51 +0300 Subject: [PATCH] Tweak gtkdoc settings so that gtkdoc generation works under @@ -17,15 +17,15 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmake/GtkDoc.cmake b/Source/cmake/GtkDoc.cmake -index b0fb31ca..6cb6313d 100644 +index 18e86448..102c873a 100644 --- a/Source/cmake/GtkDoc.cmake +++ b/Source/cmake/GtkDoc.cmake @@ -4,7 +4,7 @@ macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args) add_custom_command( OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}" DEPENDS ${DocumentationDependencies} -- COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" "LDFLAGS=${CMAKE_EXE_LINKER_FLAGS}" ${CMAKE_SOURCE_DIR}/Tools/gtkdoc/generate-gtkdoc ${_extra_args} -+ COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" "LD=${CMAKE_C_COMPILER}" "LDFLAGS=${CMAKE_C_LINK_FLAGS}" "RUN=${CMAKE_BINARY_DIR}/gtkdoc-qemuwrapper" ${CMAKE_SOURCE_DIR}/Tools/gtkdoc/generate-gtkdoc ${_extra_args} +- COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" "LDFLAGS=${CMAKE_EXE_LINKER_FLAGS}" ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/gtkdoc/generate-gtkdoc ${_extra_args} ++ COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" "LD=${CMAKE_C_COMPILER}" "LDFLAGS=${CMAKE_C_LINK_FLAGS}" "RUN=${CMAKE_BINARY_DIR}/gtkdoc-qemuwrapper" ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/gtkdoc/generate-gtkdoc ${_extra_args} COMMAND touch ${_stamp_name} WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" VERBATIM diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch b/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch deleted file mode 100644 index e71905d26a..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch +++ /dev/null @@ -1,125 +0,0 @@ -From d1634e56a2589ec62325011bf77d480a67123b52 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 17 Apr 2016 12:35:41 -0700 -Subject: [PATCH] WebKitMacros: Append to -I and not to -isystem - -gcc-6 has now introduced stdlib.h in libstdc++ for better -compliance and its including the C library stdlib.h using -include_next which is sensitive to order of system header -include paths. Its infact better to not tinker with the -system header include paths at all. Since adding /usr/include -to -system is redundant and compiler knows about it moreover -now with gcc6 it interferes with compiler's functioning -and ends up with compile errors e.g. - -/usr/include/c++/6.0.0/cstdlib:75:25: fatal error: stdlib.h: No such file or directory - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Upstream-Status: Pending - ---- - Source/JavaScriptCore/shell/CMakeLists.txt | 2 +- - Source/WebCore/PlatformGTK.cmake | 6 +++--- - Source/WebKit/PlatformGTK.cmake | 2 +- - Source/cmake/WebKitMacros.cmake | 2 +- - Tools/MiniBrowser/gtk/CMakeLists.txt | 2 +- - Tools/TestWebKitAPI/PlatformGTK.cmake | 2 +- - 6 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt -index 87153e35..cd0beed4 100644 ---- a/Source/JavaScriptCore/shell/CMakeLists.txt -+++ b/Source/JavaScriptCore/shell/CMakeLists.txt -@@ -36,7 +36,7 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS() - WEBKIT_WRAP_SOURCELIST(${JSC_SOURCES}) - WEBKIT_WRAP_SOURCELIST(${TESTAPI_SOURCES}) - include_directories(./ ${JavaScriptCore_INCLUDE_DIRECTORIES} ${JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES}) --include_directories(SYSTEM ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES}) -+include_directories(${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES}) - add_executable(jsc ${JSC_SOURCES}) - target_link_libraries(jsc ${JSC_LIBRARIES}) - -diff --git a/Source/WebCore/PlatformGTK.cmake b/Source/WebCore/PlatformGTK.cmake -index e0dd9cd9..a2997f3e 100644 ---- a/Source/WebCore/PlatformGTK.cmake -+++ b/Source/WebCore/PlatformGTK.cmake -@@ -164,7 +164,7 @@ if (ENABLE_PLUGIN_PROCESS_GTK2) - target_include_directories(WebCorePlatformGTK2 PRIVATE - ${WebCore_INCLUDE_DIRECTORIES} - ) -- target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE -+ target_include_directories(WebCorePlatformGTK2 PRIVATE - ${WebCore_SYSTEM_INCLUDE_DIRECTORIES} - ${GTK2_INCLUDE_DIRS} - ${GDK2_INCLUDE_DIRS} -@@ -190,7 +190,7 @@ add_dependencies(WebCorePlatformGTK WebCore) - target_include_directories(WebCorePlatformGTK PRIVATE - ${WebCore_INCLUDE_DIRECTORIES} - ) --target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE -+target_include_directories(WebCorePlatformGTK PRIVATE - ${WebCore_SYSTEM_INCLUDE_DIRECTORIES} - ${GTK_INCLUDE_DIRS} - ${GDK_INCLUDE_DIRS} -@@ -206,7 +206,7 @@ include_directories( - "${WEBCORE_DIR}/bindings/gobject/" - ) - --include_directories(SYSTEM -+include_directories( - ${WebCore_SYSTEM_INCLUDE_DIRECTORIES} - ) - -diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake -index 693bbdfe..20e3802f 100644 ---- a/Source/WebKit/PlatformGTK.cmake -+++ b/Source/WebKit/PlatformGTK.cmake -@@ -664,7 +664,7 @@ if (ENABLE_PLUGIN_PROCESS_GTK2) - target_include_directories(WebKitPluginProcess2 PRIVATE - ${WebKitCommonIncludeDirectories} - ) -- target_include_directories(WebKitPluginProcess2 SYSTEM PRIVATE -+ target_include_directories(WebKitPluginProcess2 PRIVATE - ${WebKitCommonSystemIncludeDirectories} - ${GTK2_INCLUDE_DIRS} - ${GDK2_INCLUDE_DIRS} -diff --git a/Source/cmake/WebKitMacros.cmake b/Source/cmake/WebKitMacros.cmake -index 6d58d57e..976e2362 100644 ---- a/Source/cmake/WebKitMacros.cmake -+++ b/Source/cmake/WebKitMacros.cmake -@@ -152,7 +152,7 @@ macro(WEBKIT_FRAMEWORK _target) - ${${_target}_SOURCES} - ) - target_include_directories(${_target} PUBLIC "$<BUILD_INTERFACE:${${_target}_INCLUDE_DIRECTORIES}>") -- target_include_directories(${_target} SYSTEM PRIVATE "$<BUILD_INTERFACE:${${_target}_SYSTEM_INCLUDE_DIRECTORIES}>") -+ target_include_directories(${_target} PRIVATE "$<BUILD_INTERFACE:${${_target}_SYSTEM_INCLUDE_DIRECTORIES}>") - target_include_directories(${_target} PRIVATE "$<BUILD_INTERFACE:${${_target}_PRIVATE_INCLUDE_DIRECTORIES}>") - target_link_libraries(${_target} ${${_target}_LIBRARIES}) - set_target_properties(${_target} PROPERTIES COMPILE_DEFINITIONS "BUILDING_${_target}") -diff --git a/Tools/MiniBrowser/gtk/CMakeLists.txt b/Tools/MiniBrowser/gtk/CMakeLists.txt -index a0d32059..f259ade2 100644 ---- a/Tools/MiniBrowser/gtk/CMakeLists.txt -+++ b/Tools/MiniBrowser/gtk/CMakeLists.txt -@@ -59,7 +59,7 @@ endif () - add_definitions(-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6) - - include_directories(${MiniBrowser_INCLUDE_DIRECTORIES}) --include_directories(SYSTEM ${MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES}) -+include_directories(${MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES}) - add_executable(MiniBrowser ${MiniBrowser_SOURCES}) - target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES}) - -diff --git a/Tools/TestWebKitAPI/PlatformGTK.cmake b/Tools/TestWebKitAPI/PlatformGTK.cmake -index 8dd0e146..d037fc35 100644 ---- a/Tools/TestWebKitAPI/PlatformGTK.cmake -+++ b/Tools/TestWebKitAPI/PlatformGTK.cmake -@@ -22,7 +22,7 @@ include_directories( - ${WEBKIT_DIR}/UIProcess/API/gtk - ) - --include_directories(SYSTEM -+include_directories( - ${GDK3_INCLUDE_DIRS} - ${GLIB_INCLUDE_DIRS} - ${GSTREAMER_INCLUDE_DIRS} diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-gstreamer-add-a-missing-format-string.patch b/meta/recipes-sato/webkit/webkitgtk/0001-gstreamer-add-a-missing-format-string.patch deleted file mode 100644 index bd4ac1e353..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-gstreamer-add-a-missing-format-string.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 2d9687840b97186b80053dd262209e39455ac876 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Wed, 8 May 2019 15:31:23 +0200 -Subject: [PATCH] gstreamer: add a missing format string - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - .../platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp -index e1e497ee..483fd65c 100644 ---- a/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp -+++ b/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp -@@ -738,7 +738,7 @@ static GstStateChangeReturn webKitWebSrcChangeState(GstElement* element, GstStat - WebKitWebSrc* src = WEBKIT_WEB_SRC(element); - - #if GST_CHECK_VERSION(1, 14, 0) -- GST_DEBUG_OBJECT(src, gst_state_change_get_name(transition)); -+ GST_DEBUG_OBJECT(src, "%s", gst_state_change_get_name(transition)); - #endif - switch (transition) { - case GST_STATE_CHANGE_READY_TO_NULL: diff --git a/meta/recipes-sato/webkit/webkitgtk/cross-compile.patch b/meta/recipes-sato/webkit/webkitgtk/cross-compile.patch deleted file mode 100644 index 4d1de72851..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/cross-compile.patch +++ /dev/null @@ -1,23 +0,0 @@ -Disable the tests meant to run when compiling natively - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: webkitgtk-2.14.5/Source/cmake/OptionsCommon.cmake -=================================================================== ---- webkitgtk-2.14.5.orig/Source/cmake/OptionsCommon.cmake -+++ webkitgtk-2.14.5/Source/cmake/OptionsCommon.cmake -@@ -67,8 +67,11 @@ endif () - # Detect Cortex-A53 core if CPU is ARM64 and OS is Linux. - # Query /proc/cpuinfo for each available core and check reported CPU part number: 0xd03 signals Cortex-A53. - # (see Main ID Register in ARM Cortex-A53 MPCore Processor Technical Reference Manual) --set(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE OFF) --if (WTF_CPU_ARM64 AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")) -+if( NOT WTF_CPU_ARM64_CORTEXA53_INITIALVALUE) -+ set(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE OFF) -+endif(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE) -+ -+if (WTF_CPU_ARM64 AND NOT CMAKE_CROSSCOMPILING AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")) - execute_process(COMMAND nproc OUTPUT_VARIABLE PROC_COUNT) - math(EXPR PROC_MAX ${PROC_COUNT}-1) - foreach (PROC_ID RANGE ${PROC_MAX}) diff --git a/meta/recipes-sato/webkit/webkitgtk/detect-gstreamer-gl.patch b/meta/recipes-sato/webkit/webkitgtk/detect-gstreamer-gl.patch deleted file mode 100644 index 57ae48c141..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/detect-gstreamer-gl.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Alberto Garcia <berto@igalia.com> -Subject: Disable USE_GSTREAMER_GL is the package is not found -Forwarded: no -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: webkitgtk/Source/cmake/GStreamerChecks.cmake -=================================================================== ---- webkitgtk.orig/Source/cmake/GStreamerChecks.cmake -+++ webkitgtk/Source/cmake/GStreamerChecks.cmake -@@ -43,7 +43,8 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO) - message(FATAL_ERROR "GStreamer 1.10 is needed for USE_GSTREAMER_GL.") - else () - if (NOT PC_GSTREAMER_GL_FOUND) -- message(FATAL_ERROR "GStreamerGL is needed for USE_GSTREAMER_GL.") -+ set(USE_GSTREAMER_GL OFF) -+ message(STATUS "GStreamerGL is needed for USE_GSTREAMER_GL.") - endif () - endif () - endif () diff --git a/meta/recipes-sato/webkit/webkitgtk/include_array.patch b/meta/recipes-sato/webkit/webkitgtk/include_array.patch deleted file mode 100644 index 7268b04bf4..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/include_array.patch +++ /dev/null @@ -1,15 +0,0 @@ -Added missing include for std::array - -Upstream-Status: Submitted [https://bugs.webkit.org/show_bug.cgi?id=197085] -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- webkitgtk-2.24.0/Source/JavaScriptCore/assembler/PerfLog.cpp.org 2019-04-18 18:03:50.226231691 -0700 -+++ webkitgtk-2.24.0/Source/JavaScriptCore/assembler/PerfLog.cpp 2019-04-18 18:07:28.569153989 -0700 -@@ -31,6 +31,7 @@ - #include <elf.h> - #include <fcntl.h> - #include <mutex> -+#include <array> - #include <sys/mman.h> - #include <sys/stat.h> - #include <sys/syscall.h> diff --git a/meta/recipes-sato/webkit/webkitgtk/include_xutil.patch b/meta/recipes-sato/webkit/webkitgtk/include_xutil.patch new file mode 100644 index 0000000000..f770b381ce --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/include_xutil.patch @@ -0,0 +1,24 @@ +Since +https://github.com/WebKit/webkit/commit/acd3f32cd43c363be032f93ede3aa10c4ee97fa4 +it uses XVisualInfo which is defined in Xutil.h + +Without this the build fails with: +webkitgtk-2.30.2/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp:132:5: error: 'XVisualInfo' was not declared in this scope; did you mean 'VisualID'? + 132 | XVisualInfo visualTemplate; + | ^~~~~~~~~~~ + | VisualID + +Upstream-Status: Pending +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> + +diff -uNr webkitgtk-2.30.2.orig/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp webkitgtk-2.30.2/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp +--- webkitgtk-2.30.2.orig/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp 2020-08-12 09:17:55.000000000 +0000 ++++ webkitgtk-2.30.2/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp 2020-11-06 03:11:40.379913528 +0000 +@@ -30,6 +30,7 @@ + + #if PLATFORM(X11) + #include <X11/Xlib.h> ++#include <X11/Xutil.h> + #include <X11/extensions/Xcomposite.h> + #if PLATFORM(GTK) + #include <X11/extensions/Xdamage.h> diff --git a/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch b/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch new file mode 100644 index 0000000000..dc3a71d932 --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch @@ -0,0 +1,74 @@ +reduce thread stack and heap usage for javascriptcore on musl + +default sizes for musl are smaller compared to glibc, this matches +to musl defaults, avoid stack overflow crashes in jscore + +This is based on Alpine Linux's patch based on suggestion from +https://bugs.webkit.org/show_bug.cgi?id=187485 + +Real solution would entail more as the suggestions to increase +stack size via -Wl,-z,stack-size=N does not work fully and also +setting DEFAULT_THREAD_STACK_SIZE_IN_KB alone is not enough either + +This patch only changes behavior when using musl, the defaults for +glibc in OE remains same + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/Source/JavaScriptCore/runtime/OptionsList.h ++++ b/Source/JavaScriptCore/runtime/OptionsList.h +@@ -75,6 +75,18 @@ constexpr bool enableWebAssemblyStreamin + // On instantiation of the first VM instance, the Options will be write protected + // and cannot be modified thereafter. + ++#if OS(LINUX) && !defined(__GLIBC__) ++// non-glibc options on linux ( musl ) ++constexpr unsigned jscMaxPerThreadStack = 128 * KB; ++constexpr unsigned jscSoftReservedZoneSize = 32 * KB; ++constexpr unsigned jscReservedZoneSize = 16 * KB; ++#else ++//default ++constexpr unsigned jscMaxPerThreadStack = 4 * MB; ++constexpr unsigned jscSoftReservedZoneSize = 128 * KB; ++constexpr unsigned jscReservedZoneSize = 64 * KB; ++#endif ++ + #define FOR_EACH_JSC_OPTION(v) \ + v(Bool, useKernTCSM, defaultTCSMValue(), Normal, "Note: this needs to go before other options since they depend on this value.") \ + v(Bool, validateOptions, false, Normal, "crashes if mis-typed JSC options were passed to the VM") \ +@@ -90,9 +102,9 @@ constexpr bool enableWebAssemblyStreamin + \ + v(Bool, reportMustSucceedExecutableAllocations, false, Normal, nullptr) \ + \ +- v(Unsigned, maxPerThreadStackUsage, 5 * MB, Normal, "Max allowed stack usage by the VM") \ +- v(Unsigned, softReservedZoneSize, 128 * KB, Normal, "A buffer greater than reservedZoneSize that reserves space for stringifying exceptions.") \ +- v(Unsigned, reservedZoneSize, 64 * KB, Normal, "The amount of stack space we guarantee to our clients (and to interal VM code that does not call out to clients).") \ ++ v(Unsigned, maxPerThreadStackUsage, jscMaxPerThreadStack, Normal, "Max allowed stack usage by the VM") \ ++ v(Unsigned, softReservedZoneSize, jscSoftReservedZoneSize, Normal, "A buffer greater than reservedZoneSize that reserves space for stringifying exceptions.") \ ++ v(Unsigned, reservedZoneSize, jscReservedZoneSize, Normal, "The amount of stack space we guarantee to our clients (and to interal VM code that does not call out to clients).") \ + \ + v(Bool, crashOnDisallowedVMEntry, ASSERT_ENABLED, Normal, "Forces a crash if we attempt to enter the VM when disallowed") \ + v(Bool, crashIfCantAllocateJITMemory, false, Normal, nullptr) \ +@@ -601,7 +613,7 @@ public: + bool init(const char*); + bool isInRange(unsigned); + const char* rangeString() const { return (m_state > InitError) ? m_rangeString : s_nullRangeStr; } +- ++ + void dump(PrintStream& out) const; + + private: +--- a/Source/WTF/wtf/Threading.h ++++ b/Source/WTF/wtf/Threading.h +@@ -56,6 +56,10 @@ + #include <array> + #endif + ++#if OS(LINUX) && !defined(__GLIBC__) ++#define DEFAULT_THREAD_STACK_SIZE_IN_KB 128 ++#endif ++ + namespace WTF { + + class AbstractLocker; diff --git a/meta/recipes-sato/webkit/webkitgtk/narrowing.patch b/meta/recipes-sato/webkit/webkitgtk/narrowing.patch deleted file mode 100644 index 598b6b5df5..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/narrowing.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fix build with clang on arm where char is unsigned - -Upstream-Status: Submitted [https://bugs.webkit.org/show_bug.cgi?id=197087] -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- a/Source/WebCore/contentextensions/DFACombiner.cpp -+++ b/Source/WebCore/contentextensions/DFACombiner.cpp -@@ -37,7 +37,7 @@ namespace WebCore { - namespace ContentExtensions { - - class DFAMerger { -- typedef MutableRangeList<char, uint64_t, 128> CombinedTransitionsMutableRangeList; -+ typedef MutableRangeList<signed char, uint64_t, 128> CombinedTransitionsMutableRangeList; - - enum class WhichDFA { - A, ---- a/Source/WebCore/contentextensions/NFAToDFA.cpp -+++ b/Source/WebCore/contentextensions/NFAToDFA.cpp -@@ -41,9 +41,9 @@ namespace WebCore { - - namespace ContentExtensions { - --typedef MutableRange<char, NFANodeIndexSet> NFANodeRange; --typedef MutableRangeList<char, NFANodeIndexSet> NFANodeRangeList; --typedef MutableRangeList<char, NFANodeIndexSet, 128> PreallocatedNFANodeRangeList; -+typedef MutableRange<signed char, NFANodeIndexSet> NFANodeRange; -+typedef MutableRangeList<signed char, NFANodeIndexSet> NFANodeRangeList; -+typedef MutableRangeList<signed char, NFANodeIndexSet, 128> PreallocatedNFANodeRangeList; - typedef Vector<uint32_t, 0, ContentExtensionsOverflowHandler> UniqueNodeList; - typedef Vector<UniqueNodeList, 0, ContentExtensionsOverflowHandler> NFANodeClosures; - diff --git a/meta/recipes-sato/webkit/webkitgtk/reduce-memory-overheads.patch b/meta/recipes-sato/webkit/webkitgtk/reduce-memory-overheads.patch new file mode 100644 index 0000000000..0493150a91 --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/reduce-memory-overheads.patch @@ -0,0 +1,22 @@ +From: Alberto Garcia <berto@igalia.com> +Subject: Reduce memory usage when not using the Gold linker +Bug-Debian: https://bugs.debian.org/949621 +Forwarded: no + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/Source/cmake/OptionsCommon.cmake ++++ b/Source/cmake/OptionsCommon.cmake +@@ -95,6 +95,12 @@ option(GCC_OFFLINEASM_SOURCE_MAP + "Produce debug line information for offlineasm-generated code" + ${GCC_OFFLINEASM_SOURCE_MAP_DEFAULT}) + ++# Pass --reduce-memory-overheads to the bfd linker in order to save memory ++if (NOT USE_LD_GOLD) ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--reduce-memory-overheads") ++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--reduce-memory-overheads") ++endif () ++ + # Enable the usage of OpenMP. + # - At this moment, OpenMP is only used as an alternative implementation + # to native threads for the parallelization of the SVG filters. diff --git a/meta/recipes-sato/webkit/webkitgtk/x32_support.patch b/meta/recipes-sato/webkit/webkitgtk/x32_support.patch deleted file mode 100644 index 85d281e7f4..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/x32_support.patch +++ /dev/null @@ -1,30 +0,0 @@ -Signed-off-by: Christopher Larson <chris_larson@mentor.com> -Upstream-Status: Pending - -From 897563a0397266d8ceb058f172e16b06419b2593 Mon Sep 17 00:00:00 2001 -From: Daniel Schepler <dschepler@gmail.com> -Date: Mon, 26 Mar 2018 17:48:34 +0300 -Subject: [PATCH] Fix FTBFS in x32 - -=================================================================== - ---- - Source/WTF/wtf/Platform.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h -index 850e298..551c047 100644 ---- a/Source/WTF/wtf/Platform.h -+++ b/Source/WTF/wtf/Platform.h -@@ -132,7 +132,11 @@ - /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */ - #if defined(__x86_64__) \ - || defined(_M_X64) -+#ifdef __ILP32__ -+#define WTF_CPU_X86_64_32 1 -+#else - #define WTF_CPU_X86_64 1 -+#endif - #define WTF_CPU_X86_SSE2 1 - #define WTF_CPU_KNOWN 1 - #endif |