diff options
Diffstat (limited to 'meta/recipes-sato/webkit/webkitgtk')
16 files changed, 257 insertions, 630 deletions
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch b/meta/recipes-sato/webkit/webkitgtk/0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch new file mode 100644 index 0000000000..a819e22127 --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch @@ -0,0 +1,73 @@ +From 575b848a3b3c14280679db80d0d518922c83d62a Mon Sep 17 00:00:00 2001 +From: Kai Kang <kai.kang@windriver.com> +Date: Fri, 11 Aug 2023 14:20:48 +0800 +Subject: [PATCH] Add a variable to control macro + __PAS_ALWAYS_INLINE_BUT_NOT_INLINE + https://bugs.webkit.org/show_bug.cgi?id=260065 + +Reviewed by NOBODY (OOPS!). + +It fails to compile webkitgtk with option `-Og` of gcc/g++: + +| In file included from Source/bmalloc/libpas/src/libpas/pas_heap_page_provider.h:30, +| from Source/bmalloc/libpas/src/libpas/pas_bootstrap_heap_page_provider.h:29, +| from Source/bmalloc/libpas/src/libpas/pas_large_heap_physical_page_sharing_cache.h:29, +| from Source/bmalloc/libpas/src/libpas/pas_basic_heap_page_caches.h:29, +| from Source/bmalloc/libpas/src/libpas/pas_heap_config_utils.h:32, +| from Source/bmalloc/libpas/src/libpas/bmalloc_heap_config.h:34, +| from Source/bmalloc/libpas/src/libpas/bmalloc_heap_inlines.h:34, +| from Source/bmalloc/bmalloc/bmalloc.h:39, +| from Source/bmalloc/bmalloc/bmalloc.cpp:26: +| In function 'pas_allocation_result pas_local_allocator_try_allocate(pas_local_allocator*, size_t, size_t, pas_heap_config, pas_allocator_counts*, pas_allocation_result_filter)', +| inlined from 'pas_allocation_result pas_try_allocate_common_impl_fast(pas_heap_config, pas_allocator_counts*, pas_allocation_result_filter, pas_local_allocator*, size_t, size_t)' at webkitgtk-2.40.2/Source/bmalloc/libpas/src/libpas/pas_try_allocate_common.h:85:46, +| inlined from 'pas_allocation_result bmalloc_try_allocate_with_alignment_impl_impl_fast(pas_local_allocator*, size_t, size_t)' at webkitgtk-2.40.2/Source/bmalloc/libpas/src/libpas/bmalloc_heap_inlines.h:59:1, +| inlined from 'pas_allocation_result pas_try_allocate_intrinsic_impl_casual_case(__pas_heap*, size_t, size_t, pas_intrinsic_heap_support*, pas_heap_config, pas_try_allocate_common_fast, pas_try_allocate_common_slow, pas_intrinsic_heap_designation_mode)' at webkitgtk-2.40.2/Source/bmalloc/libpas/src/libpas/pas_try_allocate_intrinsic.h:167:44, +| inlined from 'pas_allocation_result bmalloc_try_allocate_with_alignment_impl_casual_case(size_t, size_t)' at webkitgtk-2.40.2/Source/bmalloc/libpas/src/libpas/bmalloc_heap_inlines.h:59:1: +| webkitgtk-2.40.2/Source/bmalloc/libpas/src/libpas/pas_allocation_result.h:76:1: error: inlining failed in call to 'always_inline' 'pas_allocation_result pas_allocation_result_identity(pas_allocation_result)': function not considered for inlining +| 76 | pas_allocation_result_identity(pas_allocation_result result) +| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add an variable `WEBKIT_NO_INLINE_HINTS` to control macro +__PAS_ALWAYS_INLINE_BUT_NOT_INLINE whether includes function attribute +`always_inline`. It could set the variable to make compilation pass when +gcc option `-Og` is used. + +* Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h: +* Source/cmake/WebKitCompilerFlags.cmake: + +Upstream-Status: Submitted [https://github.com/WebKit/WebKit/pull/16601] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- + Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h | 2 +- + Source/cmake/WebKitCompilerFlags.cmake | 7 +++++++ + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h b/Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h +index 5d5fb38c..a554f700 100644 +--- a/Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h ++++ b/Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h +@@ -44,7 +44,7 @@ __PAS_BEGIN_EXTERN_C; + #define __SUSPICIOUS__ + #define __BROKEN__ + +-#ifdef __OPTIMIZE__ ++#if defined(__OPTIMIZE__) && !defined(WEBKIT_NO_INLINE_HINTS) + #define __PAS_ALWAYS_INLINE_BUT_NOT_INLINE __attribute__((__always_inline__)) + #else + #define __PAS_ALWAYS_INLINE_BUT_NOT_INLINE +diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake +index 9b2fecf9..7cdc2b6a 100644 +--- a/Source/cmake/WebKitCompilerFlags.cmake ++++ b/Source/cmake/WebKitCompilerFlags.cmake +@@ -453,3 +453,10 @@ endif () + + # FIXME: Enable pre-compiled headers for all ports <https://webkit.org/b/139438> + set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON) ++ ++# It fails to compile with `gcc -Og` ++set(WEBKIT_NO_INLINE_HINTS OFF CACHE BOOL "Disable funtion attribute always_inline for WebKit") ++ ++if (WEBKIT_NO_INLINE_HINTS) ++ add_definitions(-DWEBKIT_NO_INLINE_HINTS) ++endif () 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 deleted file mode 100644 index fd062e0f74..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 3ab2b8aa49c92a68610eef14be1fbf535109b0fb 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 9eb44f1c..a24fdd0d 100644 ---- a/Source/cmake/OptionsGTK.cmake -+++ b/Source/cmake/OptionsGTK.cmake -@@ -6,6 +6,7 @@ WEBKIT_OPTION_BEGIN() - SET_PROJECT_VERSION(2 32 0) - - set(USER_AGENT_BRANDING "" CACHE STRING "Branding to add to user agent string") -+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 10664400..d9aca95a 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-FindGObjectIntrospection.cmake-prefix-variables-obta.patch b/meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch index fae3b0b2e5..8e29ce17ed 100644 --- a/meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch +++ b/meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch @@ -1,27 +1,29 @@ -From 317a5ac120c44987219bc03486cd2f2d1842c9b9 Mon Sep 17 00:00:00 2001 +From 6348f91c29e2350ad3fec5264aa57dd4994d4583 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Tue, 27 Oct 2015 16:02:19 +0200 Subject: [PATCH] FindGObjectIntrospection.cmake: prefix variables obtained from pkg-config with PKG_CONFIG_SYSROOT_DIR -Upstream-Status: Pending [review on oe-core list] +See discussion at https://bugs.webkit.org/show_bug.cgi?id=232933 for +reasons why this is not approproiate for upstream submission. + +Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- - Source/cmake/FindGObjectIntrospection.cmake | 1 + - 1 file changed, 1 insertion(+) + Source/cmake/FindGI.cmake | 3 +++ + 1 file changed, 3 insertions(+) -diff --git a/Source/cmake/FindGObjectIntrospection.cmake b/Source/cmake/FindGObjectIntrospection.cmake -index e1f49b4..03a4446 100644 ---- a/Source/cmake/FindGObjectIntrospection.cmake -+++ b/Source/cmake/FindGObjectIntrospection.cmake -@@ -26,6 +26,7 @@ macro(_GIR_GET_PKGCONFIG_VAR _outvar _varname _extra_args) - else () - string(REGEX REPLACE "[\r\n]" " " _result "${_result}") - string(REGEX REPLACE " +$" "" _result "${_result}") -+ string(CONCAT _result $ENV{PKG_CONFIG_SYSROOT_DIR} "${_result}") - separate_arguments(_result) - set(${_outvar} ${_result} CACHE INTERNAL "") +diff --git a/Source/cmake/FindGI.cmake b/Source/cmake/FindGI.cmake +index fdc56b21..d42eca52 100644 +--- a/Source/cmake/FindGI.cmake ++++ b/Source/cmake/FindGI.cmake +@@ -72,6 +72,9 @@ if (PKG_CONFIG_FOUND) endif () --- -2.1.4 - + endif () + ++set(_GI_SCANNER_EXE "$ENV{PKG_CONFIG_SYSROOT_DIR}${_GI_SCANNER_EXE}") ++set(_GI_COMPILER_EXE "$ENV{PKG_CONFIG_SYSROOT_DIR}${_GI_COMPILER_EXE}") ++ + find_program(GI_SCANNER_EXE NAMES ${_GI_SCANNER_EXE} g-ir-scanner) + find_program(GI_COMPILER_EXE NAMES ${_GI_COMPILER_EXE} g-ir-compiler) + 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 deleted file mode 100644 index 1ccef1fdc8..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-musl.patch +++ /dev/null @@ -1,91 +0,0 @@ -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 - -Upstream-Status: Accepted -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - Source/JavaScriptCore/runtime/MachineContext.h | 10 +++++----- - Source/WTF/wtf/PlatformHave.h | 2 +- - 2 files changed, 6 insertions(+), 6 deletions(-) - ---- a/Source/JavaScriptCore/runtime/MachineContext.h -+++ b/Source/JavaScriptCore/runtime/MachineContext.h -@@ -196,7 +196,7 @@ static inline void*& stackPointerImpl(mc - #error Unknown Architecture - #endif - --#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) -+#elif defined(__linux__) - - #if CPU(X86) - return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_ESP]); -@@ -347,7 +347,7 @@ static inline void*& framePointerImpl(mc - #error Unknown Architecture - #endif - --#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) -+#elif defined(__linux__) - - // The following sequence depends on glibc's sys/ucontext.h. - #if CPU(X86) -@@ -498,7 +498,7 @@ static inline void*& instructionPointerI - #error Unknown Architecture - #endif - --#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) -+#elif defined(__linux__) - - // The following sequence depends on glibc's sys/ucontext.h. - #if CPU(X86) -@@ -656,7 +656,7 @@ inline void*& argumentPointer<1>(mcontex - #error Unknown Architecture - #endif - --#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) -+#elif defined(__linux__) - - // The following sequence depends on glibc's sys/ucontext.h. - #if CPU(X86) -@@ -773,7 +773,7 @@ inline void*& llintInstructionPointer(mc - #error Unknown Architecture - #endif - --#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) -+#elif defined(__linux__) - - // The following sequence depends on glibc's sys/ucontext.h. - #if CPU(X86) ---- 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 deleted file mode 100644 index 0c31c5fa21..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch +++ /dev/null @@ -1,46 +0,0 @@ -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 - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - Source/WebKit/PlatformGTK.cmake | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake -index a069c5f6..ea2f542b 100644 ---- a/Source/WebKit/PlatformGTK.cmake -+++ b/Source/WebKit/PlatformGTK.cmake -@@ -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 -+ # This is a target and not a command because it's used to build another .gir -+ # and a .typelib, which would trigger two racy parallel builds when using command -+ add_custom_target(WebKit2-${WEBKITGTK_API_VERSION}-gir - DEPENDS WebKit - DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir - COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS= -@@ -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 -- DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -+ DEPENDS WebKit2-${WEBKITGTK_API_VERSION}-gir - COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} - LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}" - ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}" -@@ -761,7 +762,7 @@ if (ENABLE_INTROSPECTION) - - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib -- DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -+ DEPENDS WebKit2-${WEBKITGTK_API_VERSION}-gir - COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib - ) - diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-MiniBrowser-Fix-reproduciblity.patch b/meta/recipes-sato/webkit/webkitgtk/0001-MiniBrowser-Fix-reproduciblity.patch deleted file mode 100644 index 98d2d1ded9..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-MiniBrowser-Fix-reproduciblity.patch +++ /dev/null @@ -1,31 +0,0 @@ -From dcf9ae0dc0b4510eddbeeea09e11edfb123f95af Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 2 May 2021 13:10:49 -0700 -Subject: [PATCH] MiniBrowser: Fix reproduciblity - -Do not emit references to source dir in generated sourcecode - -Upstream-Status: Submitted [https://bugs.webkit.org/show_bug.cgi?id=225283] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - Tools/MiniBrowser/gtk/CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Tools/MiniBrowser/gtk/CMakeLists.txt b/Tools/MiniBrowser/gtk/CMakeLists.txt -index 93b62521..482d3b00 100644 ---- a/Tools/MiniBrowser/gtk/CMakeLists.txt -+++ b/Tools/MiniBrowser/gtk/CMakeLists.txt -@@ -51,8 +51,8 @@ add_custom_command( - OUTPUT ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.c - ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.h - MAIN_DEPENDENCY ${MiniBrowser_DIR}/browser-marshal.list -- COMMAND glib-genmarshal --prefix=browser_marshal ${MiniBrowser_DIR}/browser-marshal.list --body > ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.c -- COMMAND glib-genmarshal --prefix=browser_marshal ${MiniBrowser_DIR}/browser-marshal.list --header > ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.h -+ COMMAND glib-genmarshal --prefix=browser_marshal ${MiniBrowser_DIR}/browser-marshal.list --body --skip-source > ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.c -+ COMMAND glib-genmarshal --prefix=browser_marshal ${MiniBrowser_DIR}/browser-marshal.list --header --skip-source > ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.h - VERBATIM) - - if (USE_GTK4) --- -2.31.1 - 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 deleted file mode 100644 index 866e9d9d09..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch +++ /dev/null @@ -1,47 +0,0 @@ -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 - OpenEmbedded build system - -This requires setting a few environment variables so that the transient -binary is build and linked correctly, and disabling the tweaks to RUN -variable from gtkdoc.py script so that our qemu wrapper is taken into use. - -Upstream-Status: Inappropriate [oe-specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - Source/cmake/GtkDoc.cmake | 2 +- - Tools/gtkdoc/gtkdoc.py | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Source/cmake/GtkDoc.cmake b/Source/cmake/GtkDoc.cmake -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}" ${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/Tools/gtkdoc/gtkdoc.py b/Tools/gtkdoc/gtkdoc.py -index 054cafa1..416de7d1 100644 ---- a/Tools/gtkdoc/gtkdoc.py -+++ b/Tools/gtkdoc/gtkdoc.py -@@ -320,9 +320,9 @@ class GTKDoc(object): - additional_ldflags = '%s %s' % (additional_ldflags, arg) - ldflags = ' "-L%s" %s ' % (self.library_path, additional_ldflags) + ldflags - current_ld_library_path = env.get('LD_LIBRARY_PATH') -- if current_ld_library_path: -+ if current_ld_library_path and 'RUN' not in env: - env['LD_LIBRARY_PATH'] = '%s:%s' % (self.library_path, current_ld_library_path) -- else: -+ elif 'RUN' not in env: - env['LD_LIBRARY_PATH'] = self.library_path - - if ldflags: diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch b/meta/recipes-sato/webkit/webkitgtk/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch deleted file mode 100644 index 3e03aa968c..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 8f1e170a6de8036ab50eb35834a77f2c79412ee3 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Wed, 28 Oct 2015 14:18:57 +0200 -Subject: [PATCH] When building introspection files, add CMAKE_C_FLAGS to the - compiler flags. - -g-ir-compiler is using a C compiler internally, so it needs to set -the proper flags for it. - -Upstream-Status: Pending [review on oe-core list] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - Source/JavaScriptCore/PlatformGTK.cmake | 2 +- - Source/WebKit/PlatformGTK.cmake | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Source/JavaScriptCore/PlatformGTK.cmake b/Source/JavaScriptCore/PlatformGTK.cmake -index 0b2968d2..2742ad80 100644 ---- a/Source/JavaScriptCore/PlatformGTK.cmake -+++ b/Source/JavaScriptCore/PlatformGTK.cmake -@@ -71,7 +71,7 @@ if (ENABLE_INTROSPECTION) - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir - DEPENDS JavaScriptCore -- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS= -+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS= - ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}" - ${INTROSPECTION_SCANNER} - --quiet -diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake -index e36e4c35..943f9794 100644 ---- a/Source/WebKit/PlatformGTK.cmake -+++ b/Source/WebKit/PlatformGTK.cmake -@@ -742,7 +742,7 @@ if (ENABLE_INTROSPECTION) - OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir - DEPENDS WebKit - DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir -- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS= -+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS= - ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}" - ${INTROSPECTION_SCANNER} - --quiet -@@ -786,7 +786,7 @@ if (ENABLE_INTROSPECTION) - OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir - DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir - DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations -+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} - LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}" - ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}" - ${INTROSPECTION_SCANNER} diff --git a/meta/recipes-sato/webkit/webkitgtk/30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch b/meta/recipes-sato/webkit/webkitgtk/30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch new file mode 100644 index 0000000000..76bcb3df99 --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch @@ -0,0 +1,67 @@ +From 1523e00a2a76e285262c8aa3721b5d99f3f2d612 Mon Sep 17 00:00:00 2001 +From: Thomas Devoogdt <thomas.devoogdt@barco.com> +Date: Mon, 16 Jan 2023 17:03:30 +0100 +Subject: [PATCH] REGRESSION(257865@main): B3Validate.cpp: fix + + !ENABLE(WEBASSEMBLY_B3JIT) + +https://bugs.webkit.org/show_bug.cgi?id=250681 + +Reviewed by NOBODY (OOPS!). + +WasmTypeDefinition.h isn't included if not ENABLE(WEBASSEMBLY_B3JIT). +Also, toB3Type and simdScalarType are not defined if it is included. + +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com> + +Upstream-Status: Inappropriate [https://bugs.launchpad.net/ubuntu/+source/webkit2gtk/+bug/2008798] + +Signed-off-by: Markus Volk <f_l_k@t-online.de> +--- + Source/JavaScriptCore/b3/B3Validate.cpp | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/Source/JavaScriptCore/b3/B3Validate.cpp b/Source/JavaScriptCore/b3/B3Validate.cpp +index eaaa3749..1d089783 100644 +--- a/Source/JavaScriptCore/b3/B3Validate.cpp ++++ b/Source/JavaScriptCore/b3/B3Validate.cpp +@@ -47,6 +47,12 @@ + #include <wtf/StringPrintStream.h> + #include <wtf/text/CString.h> + ++#if ENABLE(WEBASSEMBLY) && ENABLE(WEBASSEMBLY_B3JIT) ++#define simdScalarTypeToB3Type(type) toB3Type(Wasm::simdScalarType(type)) ++#else ++#define simdScalarTypeToB3Type(type) B3::Type() ++#endif ++ + namespace JSC { namespace B3 { + + namespace { +@@ -454,7 +460,7 @@ public: + case VectorExtractLane: + VALIDATE(!value->kind().hasExtraBits(), ("At ", *value)); + VALIDATE(value->numChildren() == 1, ("At ", *value)); +- VALIDATE(value->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value)); ++ VALIDATE(value->type() == simdScalarTypeToB3Type(value->asSIMDValue()->simdLane()), ("At ", *value)); + VALIDATE(value->child(0)->type() == V128, ("At ", *value)); + break; + case VectorReplaceLane: +@@ -462,7 +468,7 @@ public: + VALIDATE(value->numChildren() == 2, ("At ", *value)); + VALIDATE(value->type() == V128, ("At ", *value)); + VALIDATE(value->child(0)->type() == V128, ("At ", *value)); +- VALIDATE(value->child(1)->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value)); ++ VALIDATE(value->child(1)->type() == simdScalarTypeToB3Type(value->asSIMDValue()->simdLane()), ("At ", *value)); + break; + case VectorDupElement: + VALIDATE(!value->kind().hasExtraBits(), ("At ", *value)); +@@ -484,7 +490,7 @@ public: + VALIDATE(!value->kind().hasExtraBits(), ("At ", *value)); + VALIDATE(value->numChildren() == 1, ("At ", *value)); + VALIDATE(value->type() == V128, ("At ", *value)); +- VALIDATE(value->child(0)->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value)); ++ VALIDATE(value->child(0)->type() == simdScalarTypeToB3Type(value->asSIMDValue()->simdLane()), ("At ", *value)); + break; + + case VectorPopcnt: diff --git a/meta/recipes-sato/webkit/webkitgtk/49a19c49c6de8af74e521f36cb43e6c1ec2e391c.patch b/meta/recipes-sato/webkit/webkitgtk/49a19c49c6de8af74e521f36cb43e6c1ec2e391c.patch deleted file mode 100644 index ef70361c55..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/49a19c49c6de8af74e521f36cb43e6c1ec2e391c.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 49a19c49c6de8af74e521f36cb43e6c1ec2e391c Mon Sep 17 00:00:00 2001 -From: Ross Kirsling <ross.kirsling@sony.com> -Date: Tue, 13 Apr 2021 02:04:15 +0000 -Subject: [PATCH] ICU 69 deprecates ubrk_safeClone in favor of ubrk_clone - https://bugs.webkit.org/show_bug.cgi?id=224093 - -Reviewed by Yusuke Suzuki. - -In a shining example of "disappointing library practices", ICU 69 deprecates ubrk_safeClone in favor of -a new *draft* API ubrk_clone, meaning that no function with this functionality is exposed by default. - -This patch introduces a function cloneUBreakIterator to abstract over this change; however, since we need to: - - 1. confine the effects of disabling U_HIDE_DRAFT_API to a non-unified implementation file - 2. still be able to include ubrk.h from IntlSegmenter.h to instantiate ICUDeleter<ubrk_close> (*not* `clone`!) - -...the new helper function is introduced in a *headerless* implementation file, IntlWorkaround.cpp. - -* JavaScriptCore.xcodeproj/project.pbxproj: -* Sources.txt: -* runtime/IntlSegmenter.cpp: -(JSC::IntlSegmenter::segment const): -* runtime/IntlSegmenter.h: -* runtime/IntlSegments.cpp: -(JSC::IntlSegments::createSegmentIterator): -* runtime/IntlWorkaround.cpp: Added. -(JSC::cloneUBreakIterator): - - -Canonical link: https://commits.webkit.org/236421@main -git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275856 268f45cc-cd09-0410-ab3c-d52691b4dbfc - -Upstream-Status: Backport -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - Source/JavaScriptCore/ChangeLog | 27 ++++++++++ - .../JavaScriptCore.xcodeproj/project.pbxproj | 16 +++--- - Source/JavaScriptCore/Sources.txt | 1 + - .../JavaScriptCore/runtime/IntlSegmenter.cpp | 2 +- - Source/JavaScriptCore/runtime/IntlSegmenter.h | 4 ++ - .../JavaScriptCore/runtime/IntlSegments.cpp | 2 +- - .../JavaScriptCore/runtime/IntlWorkaround.cpp | 53 +++++++++++++++++++ - 7 files changed, 97 insertions(+), 8 deletions(-) - create mode 100644 Source/JavaScriptCore/runtime/IntlWorkaround.cpp - -diff --git a/Source/JavaScriptCore/Sources.txt b/Source/JavaScriptCore/Sources.txt -index 28b5b83632b9..b6492dfdcb75 100644 ---- a/Source/JavaScriptCore/Sources.txt -+++ b/Source/JavaScriptCore/Sources.txt -@@ -849,6 +849,7 @@ runtime/IntlSegmenterConstructor.cpp - runtime/IntlSegmenterPrototype.cpp - runtime/IntlSegments.cpp - runtime/IntlSegmentsPrototype.cpp -+runtime/IntlWorkaround.cpp @no-unify // Confine U_HIDE_DRAFT_API's effect to this file. - runtime/IteratorOperations.cpp - runtime/IteratorPrototype.cpp - runtime/JSArray.cpp -diff --git a/Source/JavaScriptCore/runtime/IntlSegmenter.cpp b/Source/JavaScriptCore/runtime/IntlSegmenter.cpp -index 2ad74f94bbe8..93c9b2032847 100644 ---- a/Source/JavaScriptCore/runtime/IntlSegmenter.cpp -+++ b/Source/JavaScriptCore/runtime/IntlSegmenter.cpp -@@ -125,7 +125,7 @@ JSValue IntlSegmenter::segment(JSGlobalObject* globalObject, JSValue stringValue - auto upconvertedCharacters = Box<Vector<UChar>>::create(string.charactersWithoutNullTermination()); - - UErrorCode status = U_ZERO_ERROR; -- auto segmenter = std::unique_ptr<UBreakIterator, UBreakIteratorDeleter>(ubrk_safeClone(m_segmenter.get(), nullptr, nullptr, &status)); -+ auto segmenter = std::unique_ptr<UBreakIterator, UBreakIteratorDeleter>(cloneUBreakIterator(m_segmenter.get(), &status)); - if (U_FAILURE(status)) { - throwTypeError(globalObject, scope, "failed to initialize Segments"_s); - return { }; -diff --git a/Source/JavaScriptCore/runtime/IntlSegmenter.h b/Source/JavaScriptCore/runtime/IntlSegmenter.h -index cd0f426c4897..a5239575a9f3 100644 ---- a/Source/JavaScriptCore/runtime/IntlSegmenter.h -+++ b/Source/JavaScriptCore/runtime/IntlSegmenter.h -@@ -75,4 +75,8 @@ class IntlSegmenter final : public JSNonFinalObject { - Granularity m_granularity { Granularity::Grapheme }; - }; - -+// Abstraction to call ubrk_safeClone or ubrk_clone depending on ICU version. -+// This is implemented in IntlWorkaround.cpp in order to confine draft API visibility. -+UBreakIterator* cloneUBreakIterator(const UBreakIterator*, UErrorCode*); -+ - } // namespace JSC -diff --git a/Source/JavaScriptCore/runtime/IntlSegments.cpp b/Source/JavaScriptCore/runtime/IntlSegments.cpp -index b6aba32fb822..8b81791e4133 100644 ---- a/Source/JavaScriptCore/runtime/IntlSegments.cpp -+++ b/Source/JavaScriptCore/runtime/IntlSegments.cpp -@@ -100,7 +100,7 @@ JSObject* IntlSegments::createSegmentIterator(JSGlobalObject* globalObject) - auto scope = DECLARE_THROW_SCOPE(vm); - - UErrorCode status = U_ZERO_ERROR; -- auto segmenter = std::unique_ptr<UBreakIterator, UBreakIteratorDeleter>(ubrk_safeClone(m_segmenter.get(), nullptr, nullptr, &status)); -+ auto segmenter = std::unique_ptr<UBreakIterator, UBreakIteratorDeleter>(cloneUBreakIterator(m_segmenter.get(), &status)); - if (U_FAILURE(status)) { - throwTypeError(globalObject, scope, "failed to initialize SegmentIterator"_s); - return nullptr; -diff --git a/Source/JavaScriptCore/runtime/IntlWorkaround.cpp b/Source/JavaScriptCore/runtime/IntlWorkaround.cpp -new file mode 100644 -index 000000000000..8d820857ec22 ---- /dev/null -+++ b/Source/JavaScriptCore/runtime/IntlWorkaround.cpp -@@ -0,0 +1,53 @@ -+/* -+ * Copyright (C) 2021 Sony Interactive Entertainment Inc. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * -+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' -+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS -+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -+ * THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+#include "config.h" -+ -+#include <unicode/uvernum.h> -+ -+// ICU 69 introduces draft API ubrk_clone and deprecates ubrk_safeClone. -+#if U_ICU_VERSION_MAJOR_NUM >= 69 -+#define HAVE_ICU_UBRK_CLONE 1 -+#endif -+ -+#if defined(U_HIDE_DRAFT_API) -+#undef U_HIDE_DRAFT_API -+#endif -+#include <unicode/ubrk.h> -+ -+namespace JSC { -+ -+UBreakIterator* cloneUBreakIterator(const UBreakIterator*, UErrorCode*); -+ -+UBreakIterator* cloneUBreakIterator(const UBreakIterator* iterator, UErrorCode* status) -+{ -+#if HAVE(ICU_UBRK_CLONE) -+ return ubrk_clone(iterator, status); -+#else -+ return ubrk_safeClone(iterator, nullptr, nullptr, status); -+#endif -+} -+ -+} // namespace JSC diff --git a/meta/recipes-sato/webkit/webkitgtk/include_xutil.patch b/meta/recipes-sato/webkit/webkitgtk/include_xutil.patch deleted file mode 100644 index ffe1b74be3..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/include_xutil.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d95f46e149226f634830e76cc1f4f8e3ee04ff5a Mon Sep 17 00:00:00 2001 -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Fri, 6 Nov 2020 04:38:13 +0100 -Subject: [PATCH] webkitgtk: fix build with x11 enabled - -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> - ---- - Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp b/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp -index 2d66b9cd..424fb5a1 100644 ---- a/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp -+++ b/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp -@@ -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/Xutil.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 deleted file mode 100644 index e4b5818358..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 5c82d20a00749e9106db78cdd23a09609dd3511c Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 17 Mar 2021 13:24:57 -0700 -Subject: [PATCH] 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: Accepted -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - Source/JavaScriptCore/runtime/OptionsList.h | 20 ++++++++++++++++---- - Source/WTF/wtf/Threading.h | 4 ++++ - 2 files changed, 20 insertions(+), 4 deletions(-) - -diff --git a/Source/JavaScriptCore/runtime/OptionsList.h b/Source/JavaScriptCore/runtime/OptionsList.h -index bc1cedb9..a6209742 100644 ---- a/Source/JavaScriptCore/runtime/OptionsList.h -+++ b/Source/JavaScriptCore/runtime/OptionsList.h -@@ -71,6 +71,18 @@ JS_EXPORT_PRIVATE bool canUseJITCage(); - // 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") \ -@@ -86,9 +98,9 @@ JS_EXPORT_PRIVATE bool canUseJITCage(); - \ - 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) \ -@@ -608,7 +620,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: -diff --git a/Source/WTF/wtf/Threading.h b/Source/WTF/wtf/Threading.h -index 9495d6c1..190b3811 100644 ---- a/Source/WTF/wtf/Threading.h -+++ b/Source/WTF/wtf/Threading.h -@@ -60,6 +60,10 @@ - #include <dispatch/dispatch.h> - #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/no-musttail-arm.patch b/meta/recipes-sato/webkit/webkitgtk/no-musttail-arm.patch new file mode 100644 index 0000000000..8ce37a01cc --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/no-musttail-arm.patch @@ -0,0 +1,30 @@ +From a9c874f7418cefbe78f7cd26505ae495cb59bbcf Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 12 Jan 2024 09:21:39 -0800 +Subject: [PATCH] clang/arm: Do not use MUST_TAIL_CALL + +This causes clang-17 to crash see [1] +this code is new in webkit 2.42[2] thats why we do not see the crash in older webkit + +[1] https://github.com/llvm/llvm-project/issues/67767 +[2] https://github.com/WebKit/WebKit/commit/4d816460b765acd8aef90ab474615850b91ecc35 + +Upstream-Status: Inappropriate [work around to avoid clang compiler crash] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Source/WTF/wtf/Compiler.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h +index 0ea5cb76..c5480dbc 100644 +--- a/Source/WTF/wtf/Compiler.h ++++ b/Source/WTF/wtf/Compiler.h +@@ -284,7 +284,7 @@ + /* MUST_TAIL_CALL */ + + #if !defined(MUST_TAIL_CALL) && defined(__cplusplus) && defined(__has_cpp_attribute) +-#if __has_cpp_attribute(clang::musttail) ++#if __has_cpp_attribute(clang::musttail) && !defined(__arm__) + #define MUST_TAIL_CALL [[clang::musttail]] + #endif + #endif diff --git a/meta/recipes-sato/webkit/webkitgtk/reduce-memory-overheads.patch b/meta/recipes-sato/webkit/webkitgtk/reduce-memory-overheads.patch deleted file mode 100644 index aa11c131d2..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/reduce-memory-overheads.patch +++ /dev/null @@ -1,28 +0,0 @@ -From ec6045fcf5a46123b54029a675d08d89a5e30f21 Mon Sep 17 00:00:00 2001 -From: Alberto Garcia <berto@igalia.com> -Date: Sun, 25 Apr 2021 18:45:13 +0000 -Subject: [PATCH] Reduce memory usage when not using the Gold linker - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - Source/cmake/OptionsCommon.cmake | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/Source/cmake/OptionsCommon.cmake b/Source/cmake/OptionsCommon.cmake -index dd4da682..71ad6106 100644 ---- a/Source/cmake/OptionsCommon.cmake -+++ b/Source/cmake/OptionsCommon.cmake -@@ -101,6 +101,11 @@ option(GCC_OFFLINEASM_SOURCE_MAP - ${GCC_OFFLINEASM_SOURCE_MAP_DEFAULT}) - - option(USE_APPLE_ICU "Use Apple's internal ICU" ${APPLE}) -+# 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 diff --git a/meta/recipes-sato/webkit/webkitgtk/reproducibility.patch b/meta/recipes-sato/webkit/webkitgtk/reproducibility.patch new file mode 100644 index 0000000000..93a431a0b1 --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/reproducibility.patch @@ -0,0 +1,30 @@ +From d096b945113ddecaf33062296e20b6d5a007cab3 Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Mon, 3 Jan 2022 14:18:34 +0000 +Subject: [PATCH] webkitgtk: Add reproducibility fix + +Injection a year based on the current date isn't reproducible. Hack this +to a specific year for now for reproducibilty and to avoid autobuilder failures. + +The correct fix would be to use SOURCE_DATE_EPOCH from the environment and +then this could be submitted upstream, sadly my ruby isn't up to that. + +Upstream-Status: Pending [could be reworked] +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> +--- + Source/JavaScriptCore/generator/GeneratedFile.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Source/JavaScriptCore/generator/GeneratedFile.rb b/Source/JavaScriptCore/generator/GeneratedFile.rb +index 6ed2b6e4..86a28286 100644 +--- a/Source/JavaScriptCore/generator/GeneratedFile.rb ++++ b/Source/JavaScriptCore/generator/GeneratedFile.rb +@@ -25,7 +25,7 @@ require 'date' + require 'digest' + + $LICENSE = <<-EOF +-Copyright (C) #{Date.today.year} Apple Inc. All rights reserved. ++Copyright (C) 2021 Apple Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions diff --git a/meta/recipes-sato/webkit/webkitgtk/t6-not-declared.patch b/meta/recipes-sato/webkit/webkitgtk/t6-not-declared.patch new file mode 100644 index 0000000000..d4720e4f28 --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/t6-not-declared.patch @@ -0,0 +1,37 @@ +From 3d5373575695b293b8559155431d0079a6153aff Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro <mcatanzaro@redhat.com> +Date: Mon, 5 Feb 2024 11:00:49 -0600 +Subject: [PATCH] =?UTF-8?q?[GTK]=20[2.42.5]=20LowLevelInterpreter.cpp:339:?= + =?UTF-8?q?21:=20error:=20=E2=80=98t6=E2=80=99=20was=20not=20declared=20in?= + =?UTF-8?q?=20this=20scope=20https://bugs.webkit.org/show=5Fbug.cgi=3Fid?= + =?UTF-8?q?=3D268739?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Unreviewed build fix. Seems a backport went badly, and we didn't notice +because the code is architecture-specific. + +* Source/JavaScriptCore/llint/LowLevelInterpreter.cpp: +(JSC::CLoop::execute): + +Upstream-Status: Backport [https://github.com/WebKit/WebKit/commit/3d5373575695b293b8559155431d0079a6153aff] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + Source/JavaScriptCore/llint/LowLevelInterpreter.cpp | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp +index 5064ead6cd2e7..9a2e2653b1219 100644 +--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp ++++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp +@@ -336,8 +336,6 @@ JSValue CLoop::execute(OpcodeID entryOpcodeID, void* executableAddress, VM* vm, + UNUSED_VARIABLE(t2); + UNUSED_VARIABLE(t3); + UNUSED_VARIABLE(t5); +- UNUSED_VARIABLE(t6); +- UNUSED_VARIABLE(t7); + + struct StackPointerScope { + StackPointerScope(CLoopStack& stack) + |