diff options
| -rw-r--r-- | meta/recipes-sato/webkit/webkitgtk/fix-armv7-compilation.patch | 32 | ||||
| -rw-r--r-- | meta/recipes-sato/webkit/webkitgtk/fix-musl-compilation.patch | 94 | ||||
| -rw-r--r-- | meta/recipes-sato/webkit/webkitgtk/fix_op_instanceof_handler_for_32-bit_C-loop_build.patch | 122 | ||||
| -rw-r--r-- | meta/recipes-sato/webkit/webkitgtk/no-musttail-arm.patch | 34 | ||||
| -rw-r--r-- | meta/recipes-sato/webkit/webkitgtk_2.50.0.bb (renamed from meta/recipes-sato/webkit/webkitgtk_2.48.5.bb) | 6 |
5 files changed, 219 insertions, 69 deletions
diff --git a/meta/recipes-sato/webkit/webkitgtk/fix-armv7-compilation.patch b/meta/recipes-sato/webkit/webkitgtk/fix-armv7-compilation.patch deleted file mode 100644 index a857d55ae4..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/fix-armv7-compilation.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | From 7999ecd5ee4ea3123f7e75634d2bc57f57ca7070 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Justin Michaud <jmichaud@igalia.com> | ||
| 3 | Date: Wed, 6 Aug 2025 21:14:26 +0300 | ||
| 4 | Subject: [PATCH] REGRESSION(2.48.5): [WPE][GTK] Does not compile on ARMv7 | ||
| 5 | https://bugs.webkit.org/show_bug.cgi?id=296921 | ||
| 6 | |||
| 7 | Unreviewed build fix. | ||
| 8 | |||
| 9 | * Source/JavaScriptCore/llint/WebAssembly.asm: Replace addq with addp | ||
| 10 | for sp on armv7 | ||
| 11 | |||
| 12 | Canonical link: https://commits.webkit.org/290945.344@webkitglib/2.48 | ||
| 13 | |||
| 14 | Upstream-Status: Backport [https://github.com/WebKit/WebKit/commit/7999ecd5ee4ea3123f7e75634d2bc57f57ca7070] | ||
| 15 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 16 | --- | ||
| 17 | Source/JavaScriptCore/llint/WebAssembly.asm | 2 +- | ||
| 18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/Source/JavaScriptCore/llint/WebAssembly.asm b/Source/JavaScriptCore/llint/WebAssembly.asm | ||
| 21 | index 1ac3e2accf3c..bd9041404eb1 100644 | ||
| 22 | --- a/Source/JavaScriptCore/llint/WebAssembly.asm | ||
| 23 | +++ b/Source/JavaScriptCore/llint/WebAssembly.asm | ||
| 24 | @@ -736,7 +736,7 @@ if JSVALUE64 | ||
| 25 | storep memoryBase, Callee[cfr] | ||
| 26 | else | ||
| 27 | loadp [sp], ws0 | ||
| 28 | - addq 2 * SlotSize, sp | ||
| 29 | + addp 2 * SlotSize, sp | ||
| 30 | storep ws0, Callee[cfr] | ||
| 31 | end | ||
| 32 | |||
diff --git a/meta/recipes-sato/webkit/webkitgtk/fix-musl-compilation.patch b/meta/recipes-sato/webkit/webkitgtk/fix-musl-compilation.patch new file mode 100644 index 0000000000..c0112cad18 --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/fix-musl-compilation.patch | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | From 820e4bb46d7e72ba2b14b15819166919c2e81205 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Adrian Perez de Castro <aperez@igalia.com> | ||
| 3 | Date: Wed, 15 Oct 2025 00:58:59 +0300 | ||
| 4 | Subject: [PATCH] [libpas] Build fails with libc implementations that lack | ||
| 5 | execinfo.h https://bugs.webkit.org/show_bug.cgi?id=300701 | ||
| 6 | |||
| 7 | Reviewed by NOBODY (OOPS!). | ||
| 8 | |||
| 9 | Change guards to use backtrace() and execinfo.h on Linux only when using | ||
| 10 | glibc as the C library. The PlayStation and Windows cases no longer need | ||
| 11 | to be matched, as they are neither Linux nor Darwin, both of which are now | ||
| 12 | explicitly listed. The Android check is kept as it was. | ||
| 13 | |||
| 14 | * Source/bmalloc/libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.c: | ||
| 15 | * Source/bmalloc/libpas/src/test/PGMTests.cpp: | ||
| 16 | (addPGMTests): | ||
| 17 | |||
| 18 | |||
| 19 | Fixes the following error in OE, when compiled with musl: | ||
| 20 | |||
| 21 | | ${UNPACKDIR}/webkitgtk-2.50.0/Source/bmalloc/libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.c:52:10: fatal error: execinfo.h: No such file or directory | ||
| 22 | | 52 | #include <execinfo.h> | ||
| 23 | |||
| 24 | |||
| 25 | Upstream-Status: Backport [https://github.com/WebKit/WebKit/pull/52300] | ||
| 26 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 27 | |||
| 28 | --- | ||
| 29 | .../pas_probabilistic_guard_malloc_allocator.c | 4 ++-- | ||
| 30 | Source/bmalloc/libpas/src/test/PGMTests.cpp | 13 ++++++------- | ||
| 31 | 2 files changed, 8 insertions(+), 9 deletions(-) | ||
| 32 | |||
| 33 | diff --git a/Source/bmalloc/libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.c b/Source/bmalloc/libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.c | ||
| 34 | index ff3adefa7dcc..58ec32eb4fed 100644 | ||
| 35 | --- a/Source/bmalloc/libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.c | ||
| 36 | +++ b/Source/bmalloc/libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.c | ||
| 37 | @@ -43,8 +43,8 @@ | ||
| 38 | #include <unistd.h> | ||
| 39 | #endif | ||
| 40 | |||
| 41 | -/* PlayStation does not currently support the backtrace API. Android API versions < 33 don't, either. Windows does not either. */ | ||
| 42 | -#if !PAS_PLATFORM(PLAYSTATION) && (!PAS_OS(ANDROID) || __ANDROID_API__ >= 33) && !PAS_OS(WINDOWS) | ||
| 43 | +/* PlayStation does not currently support the backtrace API. Android API versions < 33 don't, either. Windows does not either. Linux only with GLibc and not uCLibc/Musl. */ | ||
| 44 | +#if (PAS_OS(ANDROID) && __ANDROID_API__ >= 33) || PAS_OS(DARWIN) || (PAS_OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__)) | ||
| 45 | #include <execinfo.h> | ||
| 46 | #else | ||
| 47 | size_t backtrace(void** buffer, size_t size) | ||
| 48 | diff --git a/Source/bmalloc/libpas/src/test/PGMTests.cpp b/Source/bmalloc/libpas/src/test/PGMTests.cpp | ||
| 49 | index 0432f46ba3b0..dfbf957a3421 100644 | ||
| 50 | --- a/Source/bmalloc/libpas/src/test/PGMTests.cpp | ||
| 51 | +++ b/Source/bmalloc/libpas/src/test/PGMTests.cpp | ||
| 52 | @@ -43,9 +43,9 @@ | ||
| 53 | #include "pas_report_crash.h" | ||
| 54 | #include "pas_root.h" | ||
| 55 | |||
| 56 | -#if !PAS_PLATFORM(PLAYSTATION) | ||
| 57 | +#if (PAS_OS(ANDROID) && __ANDROID_API__ >= 33) || PAS_OS(DARWIN) || (PAS_OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__)) | ||
| 58 | #include <execinfo.h> | ||
| 59 | -#endif // !PAS_PLATFORM(PLAYSTATION) | ||
| 60 | +#endif | ||
| 61 | |||
| 62 | using namespace std; | ||
| 63 | |||
| 64 | @@ -383,8 +383,7 @@ void testPGMMetadataVectorManagementFewDeallocations() | ||
| 65 | pas_heap_lock_unlock(); | ||
| 66 | } | ||
| 67 | |||
| 68 | -/* Backtrace API is currently not supported on PlayStation. */ | ||
| 69 | -#if !PAS_PLATFORM(PLAYSTATION) | ||
| 70 | +#if (PAS_OS(ANDROID) && __ANDROID_API__ >= 33) || PAS_OS(DARWIN) || (PAS_OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__)) | ||
| 71 | void testPGMMetadataDoubleFreeBehavior() | ||
| 72 | { | ||
| 73 | pas_probabilistic_guard_malloc_initialize_pgm_as_enabled(1); | ||
| 74 | @@ -583,7 +582,7 @@ void testPGMAllocMetadataOnly() | ||
| 75 | CHECK(!dealloc_metadata); | ||
| 76 | } | ||
| 77 | } | ||
| 78 | -#endif // !PAS_PLATFORM(PLAYSTATION) | ||
| 79 | +#endif | ||
| 80 | |||
| 81 | } // anonymous namespace | ||
| 82 | |||
| 83 | @@ -598,9 +597,9 @@ void addPGMTests() | ||
| 84 | ADD_TEST(testPGMMetadataVectorManagement()); | ||
| 85 | ADD_TEST(testPGMMetadataVectorManagementFewDeallocations()); | ||
| 86 | ADD_TEST(testPGMMetadataVectorManagementRehash()); | ||
| 87 | -#if !PAS_PLATFORM(PLAYSTATION) | ||
| 88 | +#if (PAS_OS(ANDROID) && __ANDROID_API__ >= 33) || PAS_OS(DARWIN) || (PAS_OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__)) | ||
| 89 | ADD_TEST(testPGMMetadataDoubleFreeBehavior()); | ||
| 90 | ADD_TEST(testPGMBmallocAllocationBacktrace()); | ||
| 91 | ADD_TEST(testPGMAllocMetadataOnly()); | ||
| 92 | -#endif // !PAS_PLATFORM(PLAYSTATION) | ||
| 93 | +#endif | ||
| 94 | } | ||
diff --git a/meta/recipes-sato/webkit/webkitgtk/fix_op_instanceof_handler_for_32-bit_C-loop_build.patch b/meta/recipes-sato/webkit/webkitgtk/fix_op_instanceof_handler_for_32-bit_C-loop_build.patch new file mode 100644 index 0000000000..aa3b53e1bb --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/fix_op_instanceof_handler_for_32-bit_C-loop_build.patch | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | From 0000000000000000000000000000000000000000 Fri Sep 19 11:55:30 2025 | ||
| 2 | From: amaxcz <amaxcz@gmail.com> | ||
| 3 | Date: Fri, 19 Sep 2025 11:55:30 +0000 | ||
| 4 | Subject: [PATCH] JSC: fix op_instanceof handler for 32-bit C-loop build | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | JSC: fix op_instanceof handler for 32-bit C-loop build | ||
| 10 | |||
| 11 | Fixes missing 'op_instanceof' handler in LowLevelInterpreter32_64.asm | ||
| 12 | which breaks 32‑bit builds. | ||
| 13 | |||
| 14 | * No ChangeLog (raw external patch). | ||
| 15 | |||
| 16 | Upstream-Status: Submitted [https://bugs.webkit.org/show_bug.cgi?id=299166] | ||
| 17 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 18 | |||
| 19 | --- ./Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm 2025-08-08 11:17:51.552549400 +0200 | ||
| 20 | +++ ./Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm 2025-09-19 12:34:26.253563496 +0200 | ||
| 21 | @@ -3445,4 +3445,97 @@ | ||
| 22 | slowPathOp(mod) | ||
| 23 | |||
| 24 | llintSlowPathOp(has_structure_with_flags) | ||
| 25 | -llintSlowPathOp(instanceof) | ||
| 26 | + | ||
| 27 | +llintOpWithMetadata(op_instanceof, OpInstanceof, macro (size, get, dispatch, metadata, return) | ||
| 28 | + | ||
| 29 | + macro getAndLoadConstantOrVariable(fieldName, tagReg, payloadReg) | ||
| 30 | + get(fieldName, t5) | ||
| 31 | + loadConstantOrVariable(size, t5, tagReg, payloadReg) | ||
| 32 | + end | ||
| 33 | + | ||
| 34 | + macro isObject(field, falseLabel) | ||
| 35 | + getAndLoadConstantOrVariable(field, t0, t1) | ||
| 36 | + bineq t0, CellTag, falseLabel | ||
| 37 | + bbneq JSCell::m_type[t1], ObjectType, falseLabel | ||
| 38 | + end | ||
| 39 | + | ||
| 40 | + macro overridesHasInstance(hasInstanceField, constructorField, trueLabel) | ||
| 41 | + getAndLoadConstantOrVariable(hasInstanceField, t0, t1) | ||
| 42 | + bineq t0, CellTag, trueLabel | ||
| 43 | + loadp CodeBlock[cfr], t2 | ||
| 44 | + loadp CodeBlock::m_globalObject[t2], t2 | ||
| 45 | + loadp JSGlobalObject::m_functionProtoHasInstanceSymbolFunction[t2], t2 | ||
| 46 | + bpneq t1, t2, trueLabel | ||
| 47 | + | ||
| 48 | + get(constructorField, t5) | ||
| 49 | + loadConstantOrVariablePayload(size, t5, CellTag, t1, trueLabel) | ||
| 50 | + btbz JSCell::m_flags[t1], ImplementsDefaultHasInstance, trueLabel | ||
| 51 | + end | ||
| 52 | + | ||
| 53 | + macro storeValue(tagReg, payloadReg, fieldName) | ||
| 54 | + move tagReg, t0 | ||
| 55 | + move payloadReg, t1 | ||
| 56 | + get(fieldName, t5) | ||
| 57 | + storei t0, TagOffset[cfr, t5, 8] | ||
| 58 | + storei t1, PayloadOffset[cfr, t5, 8] | ||
| 59 | + end | ||
| 60 | + | ||
| 61 | +.getHasInstance: | ||
| 62 | + isObject(m_constructor, .throwStaticError) | ||
| 63 | + get(m_constructor, t5) | ||
| 64 | + metadata(t2, t6) | ||
| 65 | + loadConstantOrVariablePayload(size, t5, CellTag, t3, .getHasInstanceSlow) | ||
| 66 | + performGetByIDHelper(OpInstanceof, m_hasInstanceModeMetadata, m_hasInstanceValueProfile, .getHasInstanceSlow, size, | ||
| 67 | + macro (resultTag, resultPayload) | ||
| 68 | + storeValue(resultTag, resultPayload, m_hasInstanceOrPrototype) | ||
| 69 | + jmp .getPrototype | ||
| 70 | + end) | ||
| 71 | + jmp .getPrototype | ||
| 72 | + | ||
| 73 | +.getHasInstanceSlow: | ||
| 74 | + callSlowPath(_llint_slow_path_get_hasInstance_from_instanceof) | ||
| 75 | + branchIfException(_llint_throw_from_slow_path_trampoline) | ||
| 76 | + jmp .getPrototype | ||
| 77 | + | ||
| 78 | +.getHasInstanceInlinedGetterOSRReturnPoint: | ||
| 79 | + # This path is taken when exiting to the LLInt from an inlined getter for Symbol.hasInstance. | ||
| 80 | + getterSetterOSRExitReturnPoint(op_instanceof, size) | ||
| 81 | + valueProfile(size, OpInstanceof, m_hasInstanceValueProfile, r1, r0, t2) | ||
| 82 | + storeValue(r1, r0, m_hasInstanceOrPrototype) | ||
| 83 | + | ||
| 84 | +.getPrototype: | ||
| 85 | + overridesHasInstance(m_hasInstanceOrPrototype, m_constructor, .instanceofCustom) | ||
| 86 | + isObject(m_value, .false) | ||
| 87 | + get(m_constructor, t5) | ||
| 88 | + metadata(t2, t6) | ||
| 89 | + loadConstantOrVariablePayload(size, t5, CellTag, t3, .getPrototypeSlow) | ||
| 90 | + performGetByIDHelper(OpInstanceof, m_prototypeModeMetadata, m_prototypeValueProfile, .getPrototypeSlow, size, | ||
| 91 | + macro (resultTag, resultPayload) | ||
| 92 | + storeValue(resultTag, resultPayload, m_hasInstanceOrPrototype) | ||
| 93 | + jmp .instanceof | ||
| 94 | + end) | ||
| 95 | + jmp .instanceof | ||
| 96 | + | ||
| 97 | +.getPrototypeSlow: | ||
| 98 | + callSlowPath(_llint_slow_path_get_prototype_from_instanceof) | ||
| 99 | + branchIfException(_llint_throw_from_slow_path_trampoline) | ||
| 100 | + jmp .instanceof | ||
| 101 | + | ||
| 102 | +.instanceof: | ||
| 103 | + callSlowPath(_llint_slow_path_instanceof_from_instanceof) | ||
| 104 | + dispatch() | ||
| 105 | + | ||
| 106 | +.throwStaticError: | ||
| 107 | + callSlowPath(_slow_path_throw_static_error_from_instanceof) | ||
| 108 | + dispatch() | ||
| 109 | + | ||
| 110 | +.instanceofCustom: | ||
| 111 | + callSlowPath(_slow_path_instanceof_custom_from_instanceof) | ||
| 112 | + dispatch() | ||
| 113 | + | ||
| 114 | +.false: | ||
| 115 | + get(m_dst, t5) | ||
| 116 | + storei BooleanTag, TagOffset[cfr, t5, 8] | ||
| 117 | + storei 0, PayloadOffset[cfr, t5, 8] | ||
| 118 | + dispatch() | ||
| 119 | +end) | ||
| 120 | |||
| 121 | -- | ||
| 122 | 2.45.0 | ||
diff --git a/meta/recipes-sato/webkit/webkitgtk/no-musttail-arm.patch b/meta/recipes-sato/webkit/webkitgtk/no-musttail-arm.patch deleted file mode 100644 index 367e6b8342..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/no-musttail-arm.patch +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | From 4602261fa44d6bbb4c3698c79e08a6a40a6edc5a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 12 Jan 2024 09:21:39 -0800 | ||
| 4 | Subject: [PATCH] clang/arm: Do not use MUST_TAIL_CALL | ||
| 5 | |||
| 6 | This causes clang-17 to crash see [1] | ||
| 7 | this code is new in webkit 2.42[2] thats why we do not see the crash in older webkit | ||
| 8 | |||
| 9 | [1] https://github.com/llvm/llvm-project/issues/67767 | ||
| 10 | [2] https://github.com/WebKit/WebKit/commit/4d816460b765acd8aef90ab474615850b91ecc35 | ||
| 11 | |||
| 12 | Upstream-Status: Inappropriate [work around to avoid clang compiler crash] | ||
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 14 | |||
| 15 | Update context for webkitgtk 2.48.0. | ||
| 16 | |||
| 17 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
| 18 | --- | ||
| 19 | Source/WTF/wtf/Compiler.h | 2 +- | ||
| 20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 21 | |||
| 22 | diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h | ||
| 23 | index 16e416d..68dd9a0 100644 | ||
| 24 | --- a/Source/WTF/wtf/Compiler.h | ||
| 25 | +++ b/Source/WTF/wtf/Compiler.h | ||
| 26 | @@ -293,7 +293,7 @@ | ||
| 27 | #if COMPILER(CLANG) | ||
| 28 | #if __SIZEOF_POINTER__ == 8 | ||
| 29 | #if !defined(MUST_TAIL_CALL) && defined(__cplusplus) && defined(__has_cpp_attribute) | ||
| 30 | -#if __has_cpp_attribute(clang::musttail) && !defined(__powerpc__) && !defined(_WIN32) | ||
| 31 | +#if __has_cpp_attribute(clang::musttail) && !defined(__powerpc__) && !defined(_WIN32) && !defined(__arm__) | ||
| 32 | #define MUST_TAIL_CALL [[clang::musttail]] | ||
| 33 | #define HAVE_MUST_TAIL_CALL 1 | ||
| 34 | #endif | ||
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb b/meta/recipes-sato/webkit/webkitgtk_2.50.0.bb index 46031322b9..5389bf17db 100644 --- a/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb +++ b/meta/recipes-sato/webkit/webkitgtk_2.50.0.bb | |||
| @@ -13,14 +13,14 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \ | |||
| 13 | file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \ | 13 | file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \ |
| 14 | file://reproducibility.patch \ | 14 | file://reproducibility.patch \ |
| 15 | file://0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch \ | 15 | file://0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch \ |
| 16 | file://no-musttail-arm.patch \ | ||
| 17 | file://t6-not-declared.patch \ | 16 | file://t6-not-declared.patch \ |
| 18 | file://sys_futex.patch \ | 17 | file://sys_futex.patch \ |
| 19 | file://0001-Fix-build-errors-on-RISCV-https-bugs.webkit.org-show.patch \ | 18 | file://0001-Fix-build-errors-on-RISCV-https-bugs.webkit.org-show.patch \ |
| 20 | file://fix-ftbfs-riscv64.patch \ | 19 | file://fix-ftbfs-riscv64.patch \ |
| 21 | file://fix-armv7-compilation.patch \ | 20 | file://fix-musl-compilation.patch \ |
| 21 | file://fix_op_instanceof_handler_for_32-bit_C-loop_build.patch \ | ||
| 22 | " | 22 | " |
| 23 | SRC_URI[sha256sum] = "bb64ed9d1cfd58e8b5e89ccad71dd31adfed56336bad7695031ad0b668e1987c" | 23 | SRC_URI[sha256sum] = "e564b8099f9a3ae32409539b290bbd2ad084e99b6d22d4aac5e51e4554df8bc2" |
| 24 | 24 | ||
| 25 | inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen | 25 | inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen |
| 26 | 26 | ||
