diff mbox series

[v2] webkitgtk: fix compiling for 32-bit Arm

Message ID 20250809191406.59132-1-skandigraun@gmail.com
State Under Review
Headers show
Series [v2] webkitgtk: fix compiling for 32-bit Arm | expand

Commit Message

Gyorgy Sarvari Aug. 9, 2025, 7:14 p.m. UTC
When compiling for 32-bit Arm target, the compilation fails with the
following error:

| .../webkitgtk/2.48.5/sources/webkitgtk-2.48.5/Source/JavaScriptCore/offlineasm/ast.rb:1004:in 'Instruction#lowerDefault': Unhandled opcode addq at WebAssembly.asm:739 (due to WebAssembly.asm:739) (LoweringError)

Add backported patch to fix this error.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
---
 .../webkitgtk/fix-armv7-compilation.patch     | 32 +++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk_2.48.5.bb  |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/fix-armv7-compilation.patch

Comments

Khem Raj Aug. 9, 2025, 8:39 p.m. UTC | #1
Thanks for chasing it down. This addresses the root cause.

On Sat, Aug 9, 2025 at 12:14 PM Gyorgy Sarvari via
lists.openembedded.org <skandigraun=gmail.com@lists.openembedded.org>
wrote:
>
> When compiling for 32-bit Arm target, the compilation fails with the
> following error:
>
> | .../webkitgtk/2.48.5/sources/webkitgtk-2.48.5/Source/JavaScriptCore/offlineasm/ast.rb:1004:in 'Instruction#lowerDefault': Unhandled opcode addq at WebAssembly.asm:739 (due to WebAssembly.asm:739) (LoweringError)
>
> Add backported patch to fix this error.
>
> Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
> ---
>  .../webkitgtk/fix-armv7-compilation.patch     | 32 +++++++++++++++++++
>  meta/recipes-sato/webkit/webkitgtk_2.48.5.bb  |  1 +
>  2 files changed, 33 insertions(+)
>  create mode 100644 meta/recipes-sato/webkit/webkitgtk/fix-armv7-compilation.patch
>
> diff --git a/meta/recipes-sato/webkit/webkitgtk/fix-armv7-compilation.patch b/meta/recipes-sato/webkit/webkitgtk/fix-armv7-compilation.patch
> new file mode 100644
> index 0000000000..a857d55ae4
> --- /dev/null
> +++ b/meta/recipes-sato/webkit/webkitgtk/fix-armv7-compilation.patch
> @@ -0,0 +1,32 @@
> +From 7999ecd5ee4ea3123f7e75634d2bc57f57ca7070 Mon Sep 17 00:00:00 2001
> +From: Justin Michaud <jmichaud@igalia.com>
> +Date: Wed, 6 Aug 2025 21:14:26 +0300
> +Subject: [PATCH] REGRESSION(2.48.5): [WPE][GTK] Does not compile on ARMv7
> + https://bugs.webkit.org/show_bug.cgi?id=296921
> +
> +Unreviewed build fix.
> +
> +* Source/JavaScriptCore/llint/WebAssembly.asm: Replace addq with addp
> +  for sp on armv7
> +
> +Canonical link: https://commits.webkit.org/290945.344@webkitglib/2.48
> +
> +Upstream-Status: Backport [https://github.com/WebKit/WebKit/commit/7999ecd5ee4ea3123f7e75634d2bc57f57ca7070]
> +Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
> +---
> + Source/JavaScriptCore/llint/WebAssembly.asm | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Source/JavaScriptCore/llint/WebAssembly.asm b/Source/JavaScriptCore/llint/WebAssembly.asm
> +index 1ac3e2accf3c..bd9041404eb1 100644
> +--- a/Source/JavaScriptCore/llint/WebAssembly.asm
> ++++ b/Source/JavaScriptCore/llint/WebAssembly.asm
> +@@ -736,7 +736,7 @@ if JSVALUE64
> +     storep memoryBase, Callee[cfr]
> + else
> +     loadp [sp], ws0
> +-    addq 2 * SlotSize, sp
> ++    addp 2 * SlotSize, sp
> +     storep ws0, Callee[cfr]
> + end
> +
> diff --git a/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb b/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb
> index 947996450d..35b8ee2a90 100644
> --- a/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb
> +++ b/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb
> @@ -18,6 +18,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
>             file://sys_futex.patch \
>             file://0001-Fix-build-errors-on-RISCV-https-bugs.webkit.org-show.patch \
>             file://fix-ftbfs-riscv64.patch \
> +           file://fix-armv7-compilation.patch \
>             "
>  SRC_URI[sha256sum] = "bb64ed9d1cfd58e8b5e89ccad71dd31adfed56336bad7695031ad0b668e1987c"
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#221688): https://lists.openembedded.org/g/openembedded-core/message/221688
> Mute This Topic: https://lists.openembedded.org/mt/114620347/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-sato/webkit/webkitgtk/fix-armv7-compilation.patch b/meta/recipes-sato/webkit/webkitgtk/fix-armv7-compilation.patch
new file mode 100644
index 0000000000..a857d55ae4
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/fix-armv7-compilation.patch
@@ -0,0 +1,32 @@ 
+From 7999ecd5ee4ea3123f7e75634d2bc57f57ca7070 Mon Sep 17 00:00:00 2001
+From: Justin Michaud <jmichaud@igalia.com>
+Date: Wed, 6 Aug 2025 21:14:26 +0300
+Subject: [PATCH] REGRESSION(2.48.5): [WPE][GTK] Does not compile on ARMv7
+ https://bugs.webkit.org/show_bug.cgi?id=296921
+
+Unreviewed build fix.
+
+* Source/JavaScriptCore/llint/WebAssembly.asm: Replace addq with addp
+  for sp on armv7
+
+Canonical link: https://commits.webkit.org/290945.344@webkitglib/2.48
+
+Upstream-Status: Backport [https://github.com/WebKit/WebKit/commit/7999ecd5ee4ea3123f7e75634d2bc57f57ca7070]
+Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
+---
+ Source/JavaScriptCore/llint/WebAssembly.asm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Source/JavaScriptCore/llint/WebAssembly.asm b/Source/JavaScriptCore/llint/WebAssembly.asm
+index 1ac3e2accf3c..bd9041404eb1 100644
+--- a/Source/JavaScriptCore/llint/WebAssembly.asm
++++ b/Source/JavaScriptCore/llint/WebAssembly.asm
+@@ -736,7 +736,7 @@ if JSVALUE64
+     storep memoryBase, Callee[cfr]
+ else
+     loadp [sp], ws0
+-    addq 2 * SlotSize, sp
++    addp 2 * SlotSize, sp
+     storep ws0, Callee[cfr]
+ end
+ 
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb b/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb
index 947996450d..35b8ee2a90 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb
@@ -18,6 +18,7 @@  SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            file://sys_futex.patch \
            file://0001-Fix-build-errors-on-RISCV-https-bugs.webkit.org-show.patch \
            file://fix-ftbfs-riscv64.patch \
+           file://fix-armv7-compilation.patch \
            "
 SRC_URI[sha256sum] = "bb64ed9d1cfd58e8b5e89ccad71dd31adfed56336bad7695031ad0b668e1987c"