Skip to contentSkip to conversation

mozjs-128: Fix build error with arm and musl

PATCH In review [email protected] 2 participants 4 messages Jan 7 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mozjs-128: Fix build error with arm and musl

From: Ankur Tyagi <[email protected]>

Build fails for qemuarm with musl with following error:
mozglue/misc/StackWalk.o: in function `unwind_callback(_Unwind_Context*, void*)':
| /usr/src/debug/mozjs-128/128.5.2/mozglue/misc/StackWalk.cpp:810:(.text._ZL15unwind_callbackP15_Unwind_ContextPv+0x4): undefined reference to `_Unwind_GetIP'

Referenced commit[1] for the fix, also refreshed patches.

[1] https://github.com/OSSystems/meta-browser/commit/bb8662912354dae13634c0ec35c3803c344b1e72

---
 ...001-Cargo.toml-do-not-abort-on-panic.patch |  2 +-
 ...nfigure-do-not-look-for-llvm-objdump.patch |  2 +-
 ...o-not-try-to-find-a-suitable-upstrea.patch |  2 +-
 .../mozjs-128/0004-use-asm-sgidefs.h.patch    |  2 +-
 ...2.patch => 0005-Add-RISCV32-support.patch} |  2 +-
 ...x-one-occasionally-reproduced-confi.patch} |  2 +-
 ...ewrite-cargo-host-linker-in-python3.patch} |  2 +-
 ...e-stack-unwinder-like-glibc-therefo.patch} |  2 +-
 ...om-firefox-bugzilla-to-fix-compile-.patch} |  2 +-
 ...on-isn-t-available-in-ARMv5-or-v6-s.patch} |  2 +-
 ...ith-icu-uc-to-fix-build-with-ICU-76.patch} |  2 +-
 ...gc-and-riscv32gc-as-valid-architect.patch} | 38 ++++++++++++-------
 .../0013-Fix-build-error-with-musl.patch      | 30 +++++++++++++++
 .../mozjs/mozjs-128_128.5.2.bb                | 17 +++++----
 14 files changed, 75 insertions(+), 32 deletions(-)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{riscv32.patch => 0005-Add-RISCV32-support.patch} (97%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{0001-util.configure-fix-one-occasionally-reproduced-confi.patch => 0006-util.configure-fix-one-occasionally-reproduced-confi.patch} (96%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{0001-rewrite-cargo-host-linker-in-python3.patch => 0007-Rewrite-cargo-host-linker-in-python3.patch} (97%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{musl-disable-stackwalk.patch => 0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch} (94%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{0001-add-arm-to-list-of-mozinline.patch => 0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch} (95%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{armv5.patch => 0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch} (93%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch => 0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch} (92%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{riscv.patch => 0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch} (60%)
 create mode 100644 meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch
meta-oe/recipes-extended/mozjs/mozjs-128/0001-Cargo.toml-do-not-abort-on-panic.patch +1 -1
index 97a4439628..5c81126f0b 100644
@@ -1,4 +1,4 @@
-From ddd23f8547f3a56aa542924aa400d3535f734bff Mon Sep 17 00:00:00 2001
+From ffb7b90712189c9fa8634e4dc915c3afb4448d87 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Fri, 1 Oct 2021 13:00:24 +0200
 Subject: [PATCH] Cargo.toml: do not abort on panic
meta-oe/recipes-extended/mozjs/mozjs-128/0002-moz.configure-do-not-look-for-llvm-objdump.patch +1 -1
index 9a82acf77b..0616aa3ee7 100644
@@ -1,4 +1,4 @@
-From 1a5331f1997788e9a25bbc2b10eb14e2ee418be9 Mon Sep 17 00:00:00 2001
+From 0f885ae37ef7cd94fd0712cefb5d3314fbcfdf44 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Fri, 1 Oct 2021 13:01:10 +0200
 Subject: [PATCH] moz.configure: do not look for llvm-objdump
meta-oe/recipes-extended/mozjs/mozjs-128/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch +1 -1
index 40025fbc68..8367a62a39 100644
@@ -1,4 +1,4 @@
-From 2d7f06cdf631e4d4d94e9d8e33a953dc57672750 Mon Sep 17 00:00:00 2001
+From ca6cf215462de8f82fd27ad75eb20ac24fc0c512 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Fri, 1 Oct 2021 13:02:17 +0200
 Subject: [PATCH] rust.configure: do not try to find a suitable upstream target
meta-oe/recipes-extended/mozjs/mozjs-128/0004-use-asm-sgidefs.h.patch +1 -1
index eb3ff452b3..5832f36975 100644
@@ -1,4 +1,4 @@
-From 1691939a22ec12245f008993e0b9a1b1dfb91e9c Mon Sep 17 00:00:00 2001
+From af704b888a91fc3a0f88b0ef2f36de1faaf7d6e2 Mon Sep 17 00:00:00 2001
 From: Andre McCurdy <[email protected]>
 Date: Sat, 30 Apr 2016 15:29:06 -0700
 Subject: [PATCH] use <asm/sgidefs.h>
meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch +1 -1
similarity index 97%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch
index 67e23c5fcc..2359373999 100644
@@ -1,4 +1,4 @@
-From 0cc41bc953974d4852b263708bf8d12f823ca8ad Mon Sep 17 00:00:00 2001
+From 8b7f96cc479c99a286591ac6dcd0be19bcf83b15 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sun, 24 Oct 2021 22:32:50 -0700
 Subject: [PATCH] Add RISCV32 support
meta-oe/recipes-extended/mozjs/mozjs-128/0006-util.configure-fix-one-occasionally-reproduced-confi.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/0001-util.configure-fix-one-occasionally-reproduced-confi.patch +1 -1
similarity index 96%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/0001-util.configure-fix-one-occasionally-reproduced-confi.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0006-util.configure-fix-one-occasionally-reproduced-confi.patch
index d53cc2bd41..9cc7831876 100644
@@ -1,4 +1,4 @@
-From 683cd23dd269509a1d913adb2b049b84771e0a94 Mon Sep 17 00:00:00 2001
+From 13b544e4ed51f41138bf200eb84552e169df87b0 Mon Sep 17 00:00:00 2001
 From: Changqing Li <[email protected]>
 Date: Thu, 11 Nov 2021 16:05:54 +0800
 Subject: [PATCH] util.configure: fix one occasionally reproduced configure
meta-oe/recipes-extended/mozjs/mozjs-128/0007-Rewrite-cargo-host-linker-in-python3.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/0001-rewrite-cargo-host-linker-in-python3.patch +1 -1
similarity index 97%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/0001-rewrite-cargo-host-linker-in-python3.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0007-Rewrite-cargo-host-linker-in-python3.patch
index 94e1651b33..9d6a89214b 100644
@@ -1,4 +1,4 @@
-From 6f6b78628a8edc834aa147c87ebce3eb8e670e7a Mon Sep 17 00:00:00 2001
+From 31d56eba10e7cf856a2a118e0523633195fe9ea2 Mon Sep 17 00:00:00 2001
 From: Changqing Li <[email protected]>
 Date: Thu, 18 Nov 2021 07:16:39 +0000
 Subject: [PATCH] Rewrite cargo-host-linker in python3
meta-oe/recipes-extended/mozjs/mozjs-128/0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/musl-disable-stackwalk.patch +1 -1
similarity index 94%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/musl-disable-stackwalk.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch
index 3d5452ce4d..91614291c7 100644
@@ -1,4 +1,4 @@
-From d96e9a40e9da9163e0a4b3475178fe30c26deb19 Mon Sep 17 00:00:00 2001
+From fae21326f717f1c0031f3ad0ff4c3112ffb3a936 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Fri, 22 Sep 2023 22:59:56 +0000
 Subject: [PATCH] Musl does not have stack unwinder like glibc therefore we can
meta-oe/recipes-extended/mozjs/mozjs-128/0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/0001-add-arm-to-list-of-mozinline.patch +1 -1
similarity index 95%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/0001-add-arm-to-list-of-mozinline.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch
index 960b4593c2..a2e3c08edf 100644
@@ -1,4 +1,4 @@
-From 2d1fb35bd81acadc12cc077de86361ac59cee2f1 Mon Sep 17 00:00:00 2001
+From 7dc235e1558b087c69024ed40c6066bd8126f2a3 Mon Sep 17 00:00:00 2001
 From: Kai Kang <[email protected]>
 Date: Fri, 22 Sep 2023 22:59:59 +0000
 Subject: [PATCH] Backport patch from firefox bugzilla to fix compile error for
meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/armv5.patch +1 -1
similarity index 93%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/armv5.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch
index 564f423fb4..e2e935eb03 100644
@@ -1,4 +1,4 @@
-From 0dd6fdbf6a821898617f1bd8e57123be048c07f5 Mon Sep 17 00:00:00 2001
+From e94edc3eba7ea158806283d92ecd71ab87351838 Mon Sep 17 00:00:00 2001
 From: Ross Burton <[email protected]>
 Date: Mon, 16 Dec 2024 05:49:57 +0000
 Subject: [PATCH] The ISB instruction isn't available in ARMv5 or v6, so guard
meta-oe/recipes-extended/mozjs/mozjs-128/0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch +1 -1
similarity index 92%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch
index 4fb7a28eeb..2d85e29005 100644
@@ -1,4 +1,4 @@
-From cbb5cc1022cc27edefc8eabbe21458cac9bda6fb Mon Sep 17 00:00:00 2001
+From 8290fd619582651334fbfdfe7be887d539ce0f2c Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sat, 23 Nov 2024 13:28:33 -0800
 Subject: [PATCH] Link with icu-uc to fix build with ICU-76
meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +25 -13
similarity index 60%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch
index cb2dc66525..9cdb9fe913 100644
@@ -1,12 +1,35 @@
-Recognise riscv64gc and riscv32gc as valid architectures
+From 93d586d712bf34c243c6174425c78d3ab274c6a0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 7 Jan 2025 15:17:16 -0800
+Subject: [PATCH] Recognise riscv64gc and riscv32gc as valid architectures
 
 Rust uses above for architecture in tuples
 
 Upstream-Status: Pending
 Signed-off-by: Khem Raj <[email protected]>
+---
+ build/autoconf/config.sub                                     | 2 +-
+ .../mozbuild/test/configure/test_toolchain_configure.py       | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/autoconf/config.sub b/build/autoconf/config.sub
+index 2c6a07ab3c..f7ee82380c 100755
+--- a/build/autoconf/config.sub
++++ b/build/autoconf/config.sub
+@@ -1236,7 +1236,7 @@ case $cpu-$vendor in
+ 			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ 			| pru \
+ 			| pyramid \
+-			| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
++			| riscv | riscv32 | riscv32be | riscv32gc | riscv64 | riscv64be | riscv64gc \
+ 			| rl78 | romp | rs6000 | rx \
+ 			| s390 | s390x \
+ 			| score \
+diff --git a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+index 1be0d02e54..a476d787b2 100644
 --- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
 +++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
-@@ -1327,6 +1327,10 @@ class LinuxCrossCompileToolchainTest(Bas
+@@ -1327,6 +1327,10 @@ class LinuxCrossCompileToolchainTest(BaseToolchainTest):
          "mips-unknown-linux-gnu": big_endian + {"__mips__": 1},
          "riscv32-unknown-linux-gnu": little_endian + {"__riscv": 1, "__riscv_xlen": 32},
          "riscv64-unknown-linux-gnu": little_endian + {"__riscv": 1, "__riscv_xlen": 64},
@@ -17,14 +40,3 @@ Signed-off-by: Khem Raj <[email protected]>
          "sh4-unknown-linux-gnu": little_endian + {"__sh__": 1},
      }
  
---- a/build/autoconf/config.sub
-+++ b/build/autoconf/config.sub
-@@ -1236,7 +1236,7 @@ case $cpu-$vendor in
- 			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
- 			| pru \
- 			| pyramid \
--			| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
-+			| riscv | riscv32 | riscv32be | riscv32gc | riscv64 | riscv64be | riscv64gc \
- 			| rl78 | romp | rs6000 | rx \
- 			| s390 | s390x \
- 			| score \
meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch new file +30 -0
new file mode 100644
index 0000000000..1900c17f74
@@ -0,0 +1,30 @@
+From 0f903fa0be39e39083599306018fa7bd724dba9d Mon Sep 17 00:00:00 2001
+From: Ankur Tyagi <[email protected]>
+Date: Wed, 7 Jan 2026 20:26:53 +1300
+Subject: [PATCH] Fix build error with musl
+
+_Unwind_GetIP symbol is not implemented by musl, so use it only with libc.
+
+mozglue/misc/StackWalk.o: in function `unwind_callback(_Unwind_Context*, void*)':
+| /usr/src/debug/mozjs-128/128.5.2/mozglue/misc/StackWalk.cpp:810:(.text._ZL15unwind_callbackP15_Unwind_ContextPv+0x4): undefined reference to `_Unwind_GetIP'
+
+Reference: https://github.com/OSSystems/meta-browser/commit/bb8662912354dae13634c0ec35c3803c344b1e72
+Upstream-Status: Inappropriate [musl-specific]
+Signed-off-by: Ankur Tyagi <[email protected]>
+---
+ mozglue/misc/StackWalk.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp
+index d3d9208fdb..9f7155a4f7 100644
+--- a/mozglue/misc/StackWalk.cpp
++++ b/mozglue/misc/StackWalk.cpp
+@@ -696,7 +696,7 @@ MFBT_API bool MozDescribeCodeAddress(void* aPC,
+ //
+ // Changes to to OS/Architecture support here should be reflected in
+ // build/moz.configure/memory.configure
+-#elif HAVE_DLADDR &&                                           \
++#elif defined(__GLIBC__) && HAVE_DLADDR &&                     \
+     (HAVE__UNWIND_BACKTRACE || MOZ_STACKWALK_SUPPORTS_LINUX || \
+      MOZ_STACKWALK_SUPPORTS_MACOSX)
+ 
meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb +9 -8
index ceb81d07e5..fbbe3749ba 100644
@@ -8,14 +8,15 @@ SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/fire
            file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \
            file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \
            file://0004-use-asm-sgidefs.h.patch \
-           file://riscv32.patch \
-           file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \
-           file://0001-rewrite-cargo-host-linker-in-python3.patch  \
-           file://musl-disable-stackwalk.patch \
-           file://0001-add-arm-to-list-of-mozinline.patch \
-           file://armv5.patch \
-           file://0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch \
-           file://riscv.patch \
+           file://0005-Add-RISCV32-support.patch \
+           file://0006-util.configure-fix-one-occasionally-reproduced-confi.patch \
+           file://0007-Rewrite-cargo-host-linker-in-python3.patch  \
+           file://0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch \
+           file://0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch \
+           file://0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch \
+           file://0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch \
+           file://0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch \
+           file://0013-Fix-build-error-with-musl.patch \
            "
 SRC_URI[sha256sum] = "25d633eb81499cbda44b8c64fa1c1a5879d55024b864ef495d4997154d68358f"
 
#1 lore raw
Quoted 347 lines · Ankur Tyagi via lists.openembedded.org

From: Ankur Tyagi <[email protected]>

Build fails for qemuarm with musl with following error:
mozglue/misc/StackWalk.o: in function `unwind_callback(_Unwind_Context*,
void*)':
| /usr/src/debug/mozjs-128/128.5.2/mozglue/misc/StackWalk.cpp:810:(.text._ZL15unwind_callbackP15_Unwind_ContextPv+0x4):
undefined reference to `_Unwind_GetIP'

Referenced commit[1] for the fix, also refreshed patches.

[1]
https://github.com/OSSystems/meta-browser/commit/bb8662912354dae13634c0ec35c3803c344b1e72

---
 ...001-Cargo.toml-do-not-abort-on-panic.patch |  2 +-
 ...nfigure-do-not-look-for-llvm-objdump.patch |  2 +-
 ...o-not-try-to-find-a-suitable-upstrea.patch |  2 +-
 .../mozjs-128/0004-use-asm-sgidefs.h.patch    |  2 +-
 ...2.patch => 0005-Add-RISCV32-support.patch} |  2 +-
 ...x-one-occasionally-reproduced-confi.patch} |  2 +-
 ...ewrite-cargo-host-linker-in-python3.patch} |  2 +-
 ...e-stack-unwinder-like-glibc-therefo.patch} |  2 +-
 ...om-firefox-bugzilla-to-fix-compile-.patch} |  2 +-
 ...on-isn-t-available-in-ARMv5-or-v6-s.patch} |  2 +-
 ...ith-icu-uc-to-fix-build-with-ICU-76.patch} |  2 +-
 ...gc-and-riscv32gc-as-valid-architect.patch} | 38 ++++++++++++-------
 .../0013-Fix-build-error-with-musl.patch      | 30 +++++++++++++++
 .../mozjs/mozjs-128_128.5.2.bb                | 17 +++++----
 14 files changed, 75 insertions(+), 32 deletions(-)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{riscv32.patch =>

0005-Add-RISCV32-support.patch} (97%)
rename
meta-oe/recipes-extended/mozjs/mozjs-128/{0001-util.configure-fix-one-occasionally-reproduced-confi.patch => 0006-util.configure-fix-one-occasionally-reproduced-confi.patch} (96%)
rename
meta-oe/recipes-extended/mozjs/mozjs-128/{0001-rewrite-cargo-host-linker-in-python3.patch => 0007-Rewrite-cargo-host-linker-in-python3.patch} (97%)
rename
meta-oe/recipes-extended/mozjs/mozjs-128/{musl-disable-stackwalk.patch => 0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch} (94%)
rename
meta-oe/recipes-extended/mozjs/mozjs-128/{0001-add-arm-to-list-of-mozinline.patch
=> 0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch} (95%)

 rename meta-oe/recipes-extended/mozjs/mozjs-128/{armv5.patch =>

0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch} (93%)
rename
meta-oe/recipes-extended/mozjs/mozjs-128/{0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch => 0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch} (92%)

 rename meta-oe/recipes-extended/mozjs/mozjs-128/{riscv.patch =>
0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch} (60%)
 create mode 100644

meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch

diff --git a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-Cargo.toml-do-not-abort-on-panic.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0001-Cargo.toml-do-not-abort-on-panic.patch index 97a4439628..5c81126f0b 100644
---
a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-Cargo.toml-do-not-abort-on-panic.patch
+++
b/meta-oe/recipes-extended/mozjs/mozjs-128/0001-Cargo.toml-do-not-abort-on-panic.patch

meta-oe/recipes-extended/mozjs/mozjs-128/0001-Cargo.toml-do-not-abort-on-panic.patch +1 -1
@@ -1,4 +1,4 @@
-From ddd23f8547f3a56aa542924aa400d3535f734bff Mon Sep 17 00:00:00 2001
+From ffb7b90712189c9fa8634e4dc915c3afb4448d87 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Fri, 1 Oct 2021 13:00:24 +0200
 Subject: [PATCH] Cargo.toml: do not abort on panic

diff --git a/meta-oe/recipes-extended/mozjs/mozjs-128/0002-moz.configure-do-not-look-for-llvm-objdump.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0002-moz.configure-do-not-look-for-llvm-objdump.patch index 9a82acf77b..0616aa3ee7 100644
---
a/meta-oe/recipes-extended/mozjs/mozjs-128/0002-moz.configure-do-not-look-for-llvm-objdump.patch
+++
b/meta-oe/recipes-extended/mozjs/mozjs-128/0002-moz.configure-do-not-look-for-llvm-objdump.patch

meta-oe/recipes-extended/mozjs/mozjs-128/0002-moz.configure-do-not-look-for-llvm-objdump.patch +1 -1
@@ -1,4 +1,4 @@
-From 1a5331f1997788e9a25bbc2b10eb14e2ee418be9 Mon Sep 17 00:00:00 2001
+From 0f885ae37ef7cd94fd0712cefb5d3314fbcfdf44 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Fri, 1 Oct 2021 13:01:10 +0200
 Subject: [PATCH] moz.configure: do not look for llvm-objdump

diff --git a/meta-oe/recipes-extended/mozjs/mozjs-128/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch index 40025fbc68..8367a62a39 100644
---
a/meta-oe/recipes-extended/mozjs/mozjs-128/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch
+++
b/meta-oe/recipes-extended/mozjs/mozjs-128/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch

meta-oe/recipes-extended/mozjs/mozjs-128/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch +1 -1
@@ -1,4 +1,4 @@
-From 2d7f06cdf631e4d4d94e9d8e33a953dc57672750 Mon Sep 17 00:00:00 2001
+From ca6cf215462de8f82fd27ad75eb20ac24fc0c512 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Fri, 1 Oct 2021 13:02:17 +0200
 Subject: [PATCH] rust.configure: do not try to find a suitable upstream

target
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-128/0004-use-asm-sgidefs.h.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0004-use-asm-sgidefs.h.patch index eb3ff452b3..5832f36975 100644

meta-oe/recipes-extended/mozjs/mozjs-128/0004-use-asm-sgidefs.h.patch +1 -1
@@ -1,4 +1,4 @@
-From 1691939a22ec12245f008993e0b9a1b1dfb91e9c Mon Sep 17 00:00:00 2001
+From af704b888a91fc3a0f88b0ef2f36de1faaf7d6e2 Mon Sep 17 00:00:00 2001
 From: Andre McCurdy <[email protected]>
 Date: Sat, 30 Apr 2016 15:29:06 -0700
 Subject: [PATCH] use <asm/sgidefs.h>
meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch +0 -0
similarity index 97%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch

rename to meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch index 67e23c5fcc..2359373999 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch
+++
b/meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch

meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch +1 -1
@@ -1,4 +1,4 @@
-From 0cc41bc953974d4852b263708bf8d12f823ca8ad Mon Sep 17 00:00:00 2001
+From 8b7f96cc479c99a286591ac6dcd0be19bcf83b15 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sun, 24 Oct 2021 22:32:50 -0700
 Subject: [PATCH] Add RISCV32 support

diff --git a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-util.configure-fix-one-occasionally-reproduced-confi.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0006-util.configure-fix-one-occasionally-reproduced-confi.patch similarity index 96%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/0001-util.configure-fix-one-occasionally-reproduced-confi.patch rename to meta-oe/recipes-extended/mozjs/mozjs-128/0006-util.configure-fix-one-occasionally-reproduced-confi.patch index d53cc2bd41..9cc7831876 100644
---
a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-util.configure-fix-one-occasionally-reproduced-confi.patch
+++
b/meta-oe/recipes-extended/mozjs/mozjs-128/0006-util.configure-fix-one-occasionally-reproduced-confi.patch

meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch +1 -1
@@ -1,4 +1,4 @@
-From 683cd23dd269509a1d913adb2b049b84771e0a94 Mon Sep 17 00:00:00 2001
+From 13b544e4ed51f41138bf200eb84552e169df87b0 Mon Sep 17 00:00:00 2001
 From: Changqing Li <[email protected]>
 Date: Thu, 11 Nov 2021 16:05:54 +0800
 Subject: [PATCH] util.configure: fix one occasionally reproduced configure

diff --git a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-rewrite-cargo-host-linker-in-python3.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0007-Rewrite-cargo-host-linker-in-python3.patch similarity index 97%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/0001-rewrite-cargo-host-linker-in-python3.patch rename to meta-oe/recipes-extended/mozjs/mozjs-128/0007-Rewrite-cargo-host-linker-in-python3.patch index 94e1651b33..9d6a89214b 100644
---
a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-rewrite-cargo-host-linker-in-python3.patch
+++
b/meta-oe/recipes-extended/mozjs/mozjs-128/0007-Rewrite-cargo-host-linker-in-python3.patch

meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch +1 -1
@@ -1,4 +1,4 @@
-From 6f6b78628a8edc834aa147c87ebce3eb8e670e7a Mon Sep 17 00:00:00 2001
+From 31d56eba10e7cf856a2a118e0523633195fe9ea2 Mon Sep 17 00:00:00 2001
 From: Changqing Li <[email protected]>
 Date: Thu, 18 Nov 2021 07:16:39 +0000
 Subject: [PATCH] Rewrite cargo-host-linker in python3

diff --git
a/meta-oe/recipes-extended/mozjs/mozjs-128/musl-disable-stackwalk.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch similarity index 94%
rename from
meta-oe/recipes-extended/mozjs/mozjs-128/musl-disable-stackwalk.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch index 3d5452ce4d..91614291c7 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-128/musl-disable-stackwalk.patch
+++
b/meta-oe/recipes-extended/mozjs/mozjs-128/0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch

meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch +1 -1
@@ -1,4 +1,4 @@
-From d96e9a40e9da9163e0a4b3475178fe30c26deb19 Mon Sep 17 00:00:00 2001
+From fae21326f717f1c0031f3ad0ff4c3112ffb3a936 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Fri, 22 Sep 2023 22:59:56 +0000
 Subject: [PATCH] Musl does not have stack unwinder like glibc therefore

we can
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-add-arm-to-list-of-mozinline.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch similarity index 95%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/0001-add-arm-to-list-of-mozinline.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch index 960b4593c2..a2e3c08edf 100644
---
a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-add-arm-to-list-of-mozinline.patch
+++
b/meta-oe/recipes-extended/mozjs/mozjs-128/0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch

meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch +1 -1
@@ -1,4 +1,4 @@
-From 2d1fb35bd81acadc12cc077de86361ac59cee2f1 Mon Sep 17 00:00:00 2001
+From 7dc235e1558b087c69024ed40c6066bd8126f2a3 Mon Sep 17 00:00:00 2001
 From: Kai Kang <[email protected]>
 Date: Fri, 22 Sep 2023 22:59:59 +0000
 Subject: [PATCH] Backport patch from firefox bugzilla to fix compile

error for

meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/armv5.patch +0 -0
similarity index 93%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/armv5.patch

rename to meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch index 564f423fb4..e2e935eb03 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-128/armv5.patch
+++
b/meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch

meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/armv5.patch +1 -1
@@ -1,4 +1,4 @@
-From 0dd6fdbf6a821898617f1bd8e57123be048c07f5 Mon Sep 17 00:00:00 2001
+From e94edc3eba7ea158806283d92ecd71ab87351838 Mon Sep 17 00:00:00 2001
 From: Ross Burton <[email protected]>
 Date: Mon, 16 Dec 2024 05:49:57 +0000
 Subject: [PATCH] The ISB instruction isn't available in ARMv5 or v6, so

guard
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch similarity index 92%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch rename to meta-oe/recipes-extended/mozjs/mozjs-128/0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch index 4fb7a28eeb..2d85e29005 100644
---
a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch
+++
b/meta-oe/recipes-extended/mozjs/mozjs-128/0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch

meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/armv5.patch +1 -1
@@ -1,4 +1,4 @@
-From cbb5cc1022cc27edefc8eabbe21458cac9bda6fb Mon Sep 17 00:00:00 2001
+From 8290fd619582651334fbfdfe7be887d539ce0f2c Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sat, 23 Nov 2024 13:28:33 -0800
 Subject: [PATCH] Link with icu-uc to fix build with ICU-76
meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +0 -0
similarity index 60%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch

rename to meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch index cb2dc66525..9cdb9fe913 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch
+++
b/meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +23 -1
@@ -1,12 +1,35 @@
-Recognise riscv64gc and riscv32gc as valid architectures
+From 93d586d712bf34c243c6174425c78d3ab274c6a0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 7 Jan 2025 15:17:16 -0800
+Subject: [PATCH] Recognise riscv64gc and riscv32gc as valid architectures
 
 Rust uses above for architecture in tuples
 
 Upstream-Status: Pending
 Signed-off-by: Khem Raj <[email protected]>
+---
+ build/autoconf/config.sub                                     | 2 +-
+ .../mozbuild/test/configure/test_toolchain_configure.py       | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/autoconf/config.sub b/build/autoconf/config.sub
+index 2c6a07ab3c..f7ee82380c 100755
+--- a/build/autoconf/config.sub
++++ b/build/autoconf/config.sub
+@@ -1236,7 +1236,7 @@ case $cpu-$vendor in
+                       | powerpc | powerpc64 | powerpc64le | powerpcle |
 powerpcspe \
+                       | pru \
+                       | pyramid \
+-                      | riscv | riscv32 | riscv32be | riscv64 |
 riscv64be \
++                      | riscv | riscv32 | riscv32be | riscv32gc |
 riscv64 | riscv64be | riscv64gc \
+                       | rl78 | romp | rs6000 | rx \
+                       | s390 | s390x \
+                       | score \
+diff --git

a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py +index 1be0d02e54..a476d787b2 100644
--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py +++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
-@@ -1327,6 +1327,10 @@ class LinuxCrossCompileToolchainTest(Bas +@@ -1327,6 +1327,10 @@ class LinuxCrossCompileToolchainTest(BaseToolchainTest):

          "mips-unknown-linux-gnu": big_endian + {"__mips__": 1},
          "riscv32-unknown-linux-gnu": little_endian + {"__riscv": 1,
"__riscv_xlen": 32},
          "riscv64-unknown-linux-gnu": little_endian + {"__riscv": 1,

"__riscv_xlen": 64},

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +0 -4
@@ -17,14 +40,3 @@ Signed-off-by: Khem Raj <[email protected]>
          "sh4-unknown-linux-gnu": little_endian + {"__sh__": 1},
      }
 
---- a/build/autoconf/config.sub
-+++ b/build/autoconf/config.sub
-@@ -1236,7 +1236,7 @@ case $cpu-$vendor in
-                       | powerpc | powerpc64 | powerpc64le | powerpcle |

powerpcspe \

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +0 -3
-                       | pru \
-                       | pyramid \
--                      | riscv | riscv32 | riscv32be | riscv64 |

riscv64be \
-+ | riscv | riscv32 | riscv32be | riscv32gc |
riscv64 | riscv64be | riscv64gc \

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +0 -3
-                       | rl78 | romp | rs6000 | rx \
-                       | s390 | s390x \
-                       | score \

diff --git a/meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch new file mode 100644
index 0000000000..1900c17f74
--- /dev/null
+++
b/meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +8 -0
@@ -0,0 +1,30 @@
+From 0f903fa0be39e39083599306018fa7bd724dba9d Mon Sep 17 00:00:00 2001
+From: Ankur Tyagi <[email protected]>
+Date: Wed, 7 Jan 2026 20:26:53 +1300
+Subject: [PATCH] Fix build error with musl
+
+_Unwind_GetIP symbol is not implemented by musl, so use it only with libc.
+
+mozglue/misc/StackWalk.o: in function `unwind_callback(_Unwind_Context*,

void*)':
+| /usr/src/debug/mozjs-128/128.5.2/mozglue/misc/StackWalk.cpp:810:(.text._ZL15unwind_callbackP15_Unwind_ContextPv+0x4):
undefined reference to `_Unwind_GetIP'

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +2 -0
+
+Reference:

https://github.com/OSSystems/meta-browser/commit/bb8662912354dae13634c0ec35c3803c344b1e72
+Upstream-Status
<https://github.com/OSSystems/meta-browser/commit/bb8662912354dae13634c0ec35c3803c344b1e72+Upstream-Status>:
Inappropriate [musl-specific]

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +6 -0
+Signed-off-by: Ankur Tyagi <[email protected]>
+---
+ mozglue/misc/StackWalk.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch

Quoted 10 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +10 -0
+index d3d9208fdb..9f7155a4f7 100644
+--- a/mozglue/misc/StackWalk.cpp
++++ b/mozglue/misc/StackWalk.cpp
+@@ -696,7 +696,7 @@ MFBT_API bool MozDescribeCodeAddress(void* aPC,
+ //
+ // Changes to to OS/Architecture support here should be reflected in
+ // build/moz.configure/memory.configure
+-#elif HAVE_DLADDR &&                                           \
++#elif defined(__GLIBC__) && HAVE_DLADDR &&                     \
+     (HAVE__UNWIND_BACKTRACE || MOZ_STACKWALK_SUPPORTS_LINUX || \

I am wondering if HAVE__UNWIND_BACKTRACE should have been false for musl already. so need to
check __GLIBC__ is not needed perhaps

Quoted 52 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +2 -0
+      MOZ_STACKWALK_SUPPORTS_MACOSX)
+
meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb +0 -0
index ceb81d07e5..fbbe3749ba 100644
@@ -8,14 +8,15 @@ SRC_URI = "

https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/fire

            file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \
file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \
            file://0004-use-asm-sgidefs.h.patch \
meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb +9 -8
-           file://riscv32.patch \
-
 file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \
-           file://0001-rewrite-cargo-host-linker-in-python3.patch  \
-           file://musl-disable-stackwalk.patch \
-           file://0001-add-arm-to-list-of-mozinline.patch \
-           file://armv5.patch \
-           file://0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch \
-           file://riscv.patch \
+           file://0005-Add-RISCV32-support.patch \
+
 file://0006-util.configure-fix-one-occasionally-reproduced-confi.patch \
+           file://0007-Rewrite-cargo-host-linker-in-python3.patch  \
+
 file://0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch \
+
 file://0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch \
+
 file://0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch \
+           file://0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch \
+
 file://0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch \
+           file://0013-Fix-build-error-with-musl.patch \
            "
 SRC_URI[sha256sum] =

"25d633eb81499cbda44b8c64fa1c1a5879d55024b864ef495d4997154d68358f"

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#123230):
https://lists.openembedded.org/g/openembedded-devel/message/123230
Mute This Topic: https://lists.openembedded.org/mt/117139023/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
Quoted 263 lines · Khem Raj
Quoted 259 lines · Ankur Tyagi via lists.openembedded.org

From: Ankur Tyagi <[email protected]>

Build fails for qemuarm with musl with following error:
mozglue/misc/StackWalk.o: in function `unwind_callback(_Unwind_Context*, void*)':
| /usr/src/debug/mozjs-128/128.5.2/mozglue/misc/StackWalk.cpp:810:(.text._ZL15unwind_callbackP15_Unwind_ContextPv+0x4): undefined reference to `_Unwind_GetIP'

Referenced commit[1] for the fix, also refreshed patches.

[1] https://github.com/OSSystems/meta-browser/commit/bb8662912354dae13634c0ec35c3803c344b1e72

---
 ...001-Cargo.toml-do-not-abort-on-panic.patch |  2 +-
 ...nfigure-do-not-look-for-llvm-objdump.patch |  2 +-
 ...o-not-try-to-find-a-suitable-upstrea.patch |  2 +-
 .../mozjs-128/0004-use-asm-sgidefs.h.patch    |  2 +-
 ...2.patch => 0005-Add-RISCV32-support.patch} |  2 +-
 ...x-one-occasionally-reproduced-confi.patch} |  2 +-
 ...ewrite-cargo-host-linker-in-python3.patch} |  2 +-
 ...e-stack-unwinder-like-glibc-therefo.patch} |  2 +-
 ...om-firefox-bugzilla-to-fix-compile-.patch} |  2 +-
 ...on-isn-t-available-in-ARMv5-or-v6-s.patch} |  2 +-
 ...ith-icu-uc-to-fix-build-with-ICU-76.patch} |  2 +-
 ...gc-and-riscv32gc-as-valid-architect.patch} | 38 ++++++++++++-------
 .../0013-Fix-build-error-with-musl.patch      | 30 +++++++++++++++
 .../mozjs/mozjs-128_128.5.2.bb                | 17 +++++----
 14 files changed, 75 insertions(+), 32 deletions(-)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{riscv32.patch => 0005-Add-RISCV32-support.patch} (97%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{0001-util.configure-fix-one-occasionally-reproduced-confi.patch => 0006-util.configure-fix-one-occasionally-reproduced-confi.patch} (96%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{0001-rewrite-cargo-host-linker-in-python3.patch => 0007-Rewrite-cargo-host-linker-in-python3.patch} (97%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{musl-disable-stackwalk.patch => 0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch} (94%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{0001-add-arm-to-list-of-mozinline.patch => 0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch} (95%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{armv5.patch => 0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch} (93%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch => 0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch} (92%)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{riscv.patch => 0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch} (60%)
 create mode 100644 meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch
meta-oe/recipes-extended/mozjs/mozjs-128/0001-Cargo.toml-do-not-abort-on-panic.patch +1 -1
index 97a4439628..5c81126f0b 100644
@@ -1,4 +1,4 @@
-From ddd23f8547f3a56aa542924aa400d3535f734bff Mon Sep 17 00:00:00 2001
+From ffb7b90712189c9fa8634e4dc915c3afb4448d87 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Fri, 1 Oct 2021 13:00:24 +0200
 Subject: [PATCH] Cargo.toml: do not abort on panic
meta-oe/recipes-extended/mozjs/mozjs-128/0002-moz.configure-do-not-look-for-llvm-objdump.patch +1 -1
index 9a82acf77b..0616aa3ee7 100644
@@ -1,4 +1,4 @@
-From 1a5331f1997788e9a25bbc2b10eb14e2ee418be9 Mon Sep 17 00:00:00 2001
+From 0f885ae37ef7cd94fd0712cefb5d3314fbcfdf44 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Fri, 1 Oct 2021 13:01:10 +0200
 Subject: [PATCH] moz.configure: do not look for llvm-objdump
meta-oe/recipes-extended/mozjs/mozjs-128/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch +1 -1
index 40025fbc68..8367a62a39 100644
@@ -1,4 +1,4 @@
-From 2d7f06cdf631e4d4d94e9d8e33a953dc57672750 Mon Sep 17 00:00:00 2001
+From ca6cf215462de8f82fd27ad75eb20ac24fc0c512 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Fri, 1 Oct 2021 13:02:17 +0200
 Subject: [PATCH] rust.configure: do not try to find a suitable upstream target
meta-oe/recipes-extended/mozjs/mozjs-128/0004-use-asm-sgidefs.h.patch +1 -1
index eb3ff452b3..5832f36975 100644
@@ -1,4 +1,4 @@
-From 1691939a22ec12245f008993e0b9a1b1dfb91e9c Mon Sep 17 00:00:00 2001
+From af704b888a91fc3a0f88b0ef2f36de1faaf7d6e2 Mon Sep 17 00:00:00 2001
 From: Andre McCurdy <[email protected]>
 Date: Sat, 30 Apr 2016 15:29:06 -0700
 Subject: [PATCH] use <asm/sgidefs.h>
meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch +1 -1
similarity index 97%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch
index 67e23c5fcc..2359373999 100644
@@ -1,4 +1,4 @@
-From 0cc41bc953974d4852b263708bf8d12f823ca8ad Mon Sep 17 00:00:00 2001
+From 8b7f96cc479c99a286591ac6dcd0be19bcf83b15 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sun, 24 Oct 2021 22:32:50 -0700
 Subject: [PATCH] Add RISCV32 support
meta-oe/recipes-extended/mozjs/mozjs-128/0006-util.configure-fix-one-occasionally-reproduced-confi.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/0001-util.configure-fix-one-occasionally-reproduced-confi.patch +1 -1
similarity index 96%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/0001-util.configure-fix-one-occasionally-reproduced-confi.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0006-util.configure-fix-one-occasionally-reproduced-confi.patch
index d53cc2bd41..9cc7831876 100644
@@ -1,4 +1,4 @@
-From 683cd23dd269509a1d913adb2b049b84771e0a94 Mon Sep 17 00:00:00 2001
+From 13b544e4ed51f41138bf200eb84552e169df87b0 Mon Sep 17 00:00:00 2001
 From: Changqing Li <[email protected]>
 Date: Thu, 11 Nov 2021 16:05:54 +0800
 Subject: [PATCH] util.configure: fix one occasionally reproduced configure
meta-oe/recipes-extended/mozjs/mozjs-128/0007-Rewrite-cargo-host-linker-in-python3.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/0001-rewrite-cargo-host-linker-in-python3.patch +1 -1
similarity index 97%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/0001-rewrite-cargo-host-linker-in-python3.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0007-Rewrite-cargo-host-linker-in-python3.patch
index 94e1651b33..9d6a89214b 100644
@@ -1,4 +1,4 @@
-From 6f6b78628a8edc834aa147c87ebce3eb8e670e7a Mon Sep 17 00:00:00 2001
+From 31d56eba10e7cf856a2a118e0523633195fe9ea2 Mon Sep 17 00:00:00 2001
 From: Changqing Li <[email protected]>
 Date: Thu, 18 Nov 2021 07:16:39 +0000
 Subject: [PATCH] Rewrite cargo-host-linker in python3
meta-oe/recipes-extended/mozjs/mozjs-128/0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/musl-disable-stackwalk.patch +1 -1
similarity index 94%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/musl-disable-stackwalk.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch
index 3d5452ce4d..91614291c7 100644
@@ -1,4 +1,4 @@
-From d96e9a40e9da9163e0a4b3475178fe30c26deb19 Mon Sep 17 00:00:00 2001
+From fae21326f717f1c0031f3ad0ff4c3112ffb3a936 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Fri, 22 Sep 2023 22:59:56 +0000
 Subject: [PATCH] Musl does not have stack unwinder like glibc therefore we can
meta-oe/recipes-extended/mozjs/mozjs-128/0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/0001-add-arm-to-list-of-mozinline.patch +1 -1
similarity index 95%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/0001-add-arm-to-list-of-mozinline.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch
index 960b4593c2..a2e3c08edf 100644
@@ -1,4 +1,4 @@
-From 2d1fb35bd81acadc12cc077de86361ac59cee2f1 Mon Sep 17 00:00:00 2001
+From 7dc235e1558b087c69024ed40c6066bd8126f2a3 Mon Sep 17 00:00:00 2001
 From: Kai Kang <[email protected]>
 Date: Fri, 22 Sep 2023 22:59:59 +0000
 Subject: [PATCH] Backport patch from firefox bugzilla to fix compile error for
meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/armv5.patch +1 -1
similarity index 93%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/armv5.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch
index 564f423fb4..e2e935eb03 100644
@@ -1,4 +1,4 @@
-From 0dd6fdbf6a821898617f1bd8e57123be048c07f5 Mon Sep 17 00:00:00 2001
+From e94edc3eba7ea158806283d92ecd71ab87351838 Mon Sep 17 00:00:00 2001
 From: Ross Burton <[email protected]>
 Date: Mon, 16 Dec 2024 05:49:57 +0000
 Subject: [PATCH] The ISB instruction isn't available in ARMv5 or v6, so guard
meta-oe/recipes-extended/mozjs/mozjs-128/0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch +1 -1
similarity index 92%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch
index 4fb7a28eeb..2d85e29005 100644
@@ -1,4 +1,4 @@
-From cbb5cc1022cc27edefc8eabbe21458cac9bda6fb Mon Sep 17 00:00:00 2001
+From 8290fd619582651334fbfdfe7be887d539ce0f2c Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sat, 23 Nov 2024 13:28:33 -0800
 Subject: [PATCH] Link with icu-uc to fix build with ICU-76
meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +25 -13
similarity index 60%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch
rename to meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch
index cb2dc66525..9cdb9fe913 100644
@@ -1,12 +1,35 @@
-Recognise riscv64gc and riscv32gc as valid architectures
+From 93d586d712bf34c243c6174425c78d3ab274c6a0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 7 Jan 2025 15:17:16 -0800
+Subject: [PATCH] Recognise riscv64gc and riscv32gc as valid architectures
 
 Rust uses above for architecture in tuples
 
 Upstream-Status: Pending
 Signed-off-by: Khem Raj <[email protected]>
+---
+ build/autoconf/config.sub                                     | 2 +-
+ .../mozbuild/test/configure/test_toolchain_configure.py       | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/autoconf/config.sub b/build/autoconf/config.sub
+index 2c6a07ab3c..f7ee82380c 100755
+--- a/build/autoconf/config.sub
++++ b/build/autoconf/config.sub
+@@ -1236,7 +1236,7 @@ case $cpu-$vendor in
+                       | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+                       | pru \
+                       | pyramid \
+-                      | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
++                      | riscv | riscv32 | riscv32be | riscv32gc | riscv64 | riscv64be | riscv64gc \
+                       | rl78 | romp | rs6000 | rx \
+                       | s390 | s390x \
+                       | score \
+diff --git a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+index 1be0d02e54..a476d787b2 100644
 --- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
 +++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
-@@ -1327,6 +1327,10 @@ class LinuxCrossCompileToolchainTest(Bas
+@@ -1327,6 +1327,10 @@ class LinuxCrossCompileToolchainTest(BaseToolchainTest):
          "mips-unknown-linux-gnu": big_endian + {"__mips__": 1},
          "riscv32-unknown-linux-gnu": little_endian + {"__riscv": 1, "__riscv_xlen": 32},
          "riscv64-unknown-linux-gnu": little_endian + {"__riscv": 1, "__riscv_xlen": 64},
@@ -17,14 +40,3 @@ Signed-off-by: Khem Raj <[email protected]>
          "sh4-unknown-linux-gnu": little_endian + {"__sh__": 1},
      }
 
---- a/build/autoconf/config.sub
-+++ b/build/autoconf/config.sub
-@@ -1236,7 +1236,7 @@ case $cpu-$vendor in
-                       | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
-                       | pru \
-                       | pyramid \
--                      | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
-+                      | riscv | riscv32 | riscv32be | riscv32gc | riscv64 | riscv64be | riscv64gc \
-                       | rl78 | romp | rs6000 | rx \
-                       | s390 | s390x \
-                       | score \
meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch new file +24 -0
new file mode 100644
index 0000000000..1900c17f74
@@ -0,0 +1,30 @@
+From 0f903fa0be39e39083599306018fa7bd724dba9d Mon Sep 17 00:00:00 2001
+From: Ankur Tyagi <[email protected]>
+Date: Wed, 7 Jan 2026 20:26:53 +1300
+Subject: [PATCH] Fix build error with musl
+
+_Unwind_GetIP symbol is not implemented by musl, so use it only with libc.
+
+mozglue/misc/StackWalk.o: in function `unwind_callback(_Unwind_Context*, void*)':
+| /usr/src/debug/mozjs-128/128.5.2/mozglue/misc/StackWalk.cpp:810:(.text._ZL15unwind_callbackP15_Unwind_ContextPv+0x4): undefined reference to `_Unwind_GetIP'
+
+Reference: https://github.com/OSSystems/meta-browser/commit/bb8662912354dae13634c0ec35c3803c344b1e72
+Upstream-Status: Inappropriate [musl-specific]
+Signed-off-by: Ankur Tyagi <[email protected]>
+---
+ mozglue/misc/StackWalk.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp
+index d3d9208fdb..9f7155a4f7 100644
+--- a/mozglue/misc/StackWalk.cpp
++++ b/mozglue/misc/StackWalk.cpp
+@@ -696,7 +696,7 @@ MFBT_API bool MozDescribeCodeAddress(void* aPC,
+ //
+ // Changes to to OS/Architecture support here should be reflected in
Quoted 9 lines

meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch line 28

Quoted 4 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch new file +4 -0
+ // build/moz.configure/memory.configure
+-#elif HAVE_DLADDR &&                                           \
++#elif defined(__GLIBC__) && HAVE_DLADDR &&                     \
+     (HAVE__UNWIND_BACKTRACE || MOZ_STACKWALK_SUPPORTS_LINUX || \

I am wondering if HAVE__UNWIND_BACKTRACE should have been false for musl already. so need to check __GLIBC__ is not needed perhaps

Hi Khem,

Seems HAVE__UNWIND_BACKTRACE is not false for musl, I was getting build error. Following commit[1] is also checking for the environment

[1] https://github.com/openembedded/meta-openembedded/commit/82c7bdd4cb4b0f1176afe0ad6a599f9db49f7055

cheers
Ankur

Quoted 40 lines
Quoted 40 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch new file +2 -0
+      MOZ_STACKWALK_SUPPORTS_MACOSX)
+
meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb +9 -9
index ceb81d07e5..fbbe3749ba 100644
@@ -8,14 +8,15 @@ SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/fire
            file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \
            file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \
            file://0004-use-asm-sgidefs.h.patch \
-           file://riscv32.patch \
-           file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \
-           file://0001-rewrite-cargo-host-linker-in-python3.patch  \
-           file://musl-disable-stackwalk.patch \
-           file://0001-add-arm-to-list-of-mozinline.patch \
-           file://armv5.patch \
-           file://0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch \
-           file://riscv.patch \
+           file://0005-Add-RISCV32-support.patch \
+           file://0006-util.configure-fix-one-occasionally-reproduced-confi.patch \
+           file://0007-Rewrite-cargo-host-linker-in-python3.patch  \
+           file://0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch \
+           file://0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch \
+           file://0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch \
+           file://0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch \
+           file://0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch \
+           file://0013-Fix-build-error-with-musl.patch \
            "
 SRC_URI[sha256sum] = "25d633eb81499cbda44b8c64fa1c1a5879d55024b864ef495d4997154d68358f"
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#123230): https://lists.openembedded.org/g/openembedded-devel/message/123230
Mute This Topic: https://lists.openembedded.org/mt/117139023/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw
Quoted 376 lines · Ankur Tyagi
Quoted 4 lines · Khem Raj

On Wed, Jan 7, 2026 at 10:14 AM Ankur Tyagi via lists.openembedded.org

Quoted 5 lines · <[email protected]> wrote:
Quoted 5 lines

From: Ankur Tyagi <[email protected]>

Build fails for qemuarm with musl with following error:
mozglue/misc/StackWalk.o: in function

`unwind_callback(_Unwind_Context*, void*)':

Quoted 1 line
Quoted 1 line

|

/usr/src/debug/mozjs-128/128.5.2/mozglue/misc/StackWalk.cpp:810:(.text._ZL15unwind_callbackP15_Unwind_ContextPv+0x4):
undefined reference to `_Unwind_GetIP'

Quoted 4 lines
Quoted 4 lines

Referenced commit[1] for the fix, also refreshed patches.

[1]

https://github.com/OSSystems/meta-browser/commit/bb8662912354dae13634c0ec35c3803c344b1e72

Quoted 11 lines
Quoted 11 lines
---
 ...001-Cargo.toml-do-not-abort-on-panic.patch |  2 +-
 ...nfigure-do-not-look-for-llvm-objdump.patch |  2 +-
 ...o-not-try-to-find-a-suitable-upstrea.patch |  2 +-
 .../mozjs-128/0004-use-asm-sgidefs.h.patch    |  2 +-
 ...2.patch => 0005-Add-RISCV32-support.patch} |  2 +-
 ...x-one-occasionally-reproduced-confi.patch} |  2 +-
 ...ewrite-cargo-host-linker-in-python3.patch} |  2 +-
 ...e-stack-unwinder-like-glibc-therefo.patch} |  2 +-
Quoted 8 lines
Quoted 8 lines
 ...om-firefox-bugzilla-to-fix-compile-.patch} |  2 +-
 ...on-isn-t-available-in-ARMv5-or-v6-s.patch} |  2 +-
 ...ith-icu-uc-to-fix-build-with-ICU-76.patch} |  2 +-
 ...gc-and-riscv32gc-as-valid-architect.patch} | 38 ++++++++++++-------
 .../0013-Fix-build-error-with-musl.patch      | 30 +++++++++++++++
 .../mozjs/mozjs-128_128.5.2.bb                | 17 +++++----
 14 files changed, 75 insertions(+), 32 deletions(-)
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{riscv32.patch =>

0005-Add-RISCV32-support.patch} (97%)

Quoted 1 line
Quoted 1 line

rename

meta-oe/recipes-extended/mozjs/mozjs-128/{0001-util.configure-fix-one-occasionally-reproduced-confi.patch => 0006-util.configure-fix-one-occasionally-reproduced-confi.patch} (96%)

Quoted 1 line
Quoted 1 line

rename

meta-oe/recipes-extended/mozjs/mozjs-128/{0001-rewrite-cargo-host-linker-in-python3.patch => 0007-Rewrite-cargo-host-linker-in-python3.patch} (97%)

Quoted 1 line
Quoted 1 line

rename

meta-oe/recipes-extended/mozjs/mozjs-128/{musl-disable-stackwalk.patch => 0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch} (94%)

Quoted 1 line
Quoted 1 line

rename

meta-oe/recipes-extended/mozjs/mozjs-128/{0001-add-arm-to-list-of-mozinline.patch => 0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch} (95%)

Quoted 1 line
Quoted 1 line
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{armv5.patch =>

0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch} (93%)

Quoted 1 line
Quoted 1 line

rename

meta-oe/recipes-extended/mozjs/mozjs-128/{0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch => 0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch} (92%)

Quoted 1 line
Quoted 1 line
 rename meta-oe/recipes-extended/mozjs/mozjs-128/{riscv.patch =>

0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch} (60%)

Quoted 1 line
Quoted 1 line
 create mode 100644

meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch

Quoted 2 lines
Quoted 2 lines

diff --git

a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-Cargo.toml-do-not-abort-on-panic.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0001-Cargo.toml-do-not-abort-on-panic.patch

Quoted 2 lines
Quoted 2 lines

index 97a4439628..5c81126f0b 100644
---

a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-Cargo.toml-do-not-abort-on-panic.patch

Quoted 1 line
Quoted 1 line

+++

b/meta-oe/recipes-extended/mozjs/mozjs-128/0001-Cargo.toml-do-not-abort-on-panic.patch

Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0001-Cargo.toml-do-not-abort-on-panic.patch +1 -1
@@ -1,4 +1,4 @@
-From ddd23f8547f3a56aa542924aa400d3535f734bff Mon Sep 17 00:00:00 2001
+From ffb7b90712189c9fa8634e4dc915c3afb4448d87 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Fri, 1 Oct 2021 13:00:24 +0200
 Subject: [PATCH] Cargo.toml: do not abort on panic

diff --git

a/meta-oe/recipes-extended/mozjs/mozjs-128/0002-moz.configure-do-not-look-for-llvm-objdump.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0002-moz.configure-do-not-look-for-llvm-objdump.patch

Quoted 2 lines
Quoted 2 lines

index 9a82acf77b..0616aa3ee7 100644
---

a/meta-oe/recipes-extended/mozjs/mozjs-128/0002-moz.configure-do-not-look-for-llvm-objdump.patch

Quoted 1 line
Quoted 1 line

+++

b/meta-oe/recipes-extended/mozjs/mozjs-128/0002-moz.configure-do-not-look-for-llvm-objdump.patch

Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0002-moz.configure-do-not-look-for-llvm-objdump.patch +1 -1
@@ -1,4 +1,4 @@
-From 1a5331f1997788e9a25bbc2b10eb14e2ee418be9 Mon Sep 17 00:00:00 2001
+From 0f885ae37ef7cd94fd0712cefb5d3314fbcfdf44 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Fri, 1 Oct 2021 13:01:10 +0200
 Subject: [PATCH] moz.configure: do not look for llvm-objdump

diff --git

a/meta-oe/recipes-extended/mozjs/mozjs-128/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch

Quoted 2 lines
Quoted 2 lines

index 40025fbc68..8367a62a39 100644
---

a/meta-oe/recipes-extended/mozjs/mozjs-128/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch

Quoted 1 line
Quoted 1 line

+++

b/meta-oe/recipes-extended/mozjs/mozjs-128/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch

Quoted 6 lines

meta-oe/recipes-extended/mozjs/mozjs-128/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch line 4

Quoted 6 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch +1 -1
@@ -1,4 +1,4 @@
-From 2d7f06cdf631e4d4d94e9d8e33a953dc57672750 Mon Sep 17 00:00:00 2001
+From ca6cf215462de8f82fd27ad75eb20ac24fc0c512 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Fri, 1 Oct 2021 13:02:17 +0200
 Subject: [PATCH] rust.configure: do not try to find a suitable

upstream target

Quoted 1 line
Quoted 1 line

diff --git

a/meta-oe/recipes-extended/mozjs/mozjs-128/0004-use-asm-sgidefs.h.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0004-use-asm-sgidefs.h.patch

Quoted 2 lines
Quoted 2 lines

index eb3ff452b3..5832f36975 100644
---

a/meta-oe/recipes-extended/mozjs/mozjs-128/0004-use-asm-sgidefs.h.patch

Quoted 1 line
Quoted 1 line

+++

b/meta-oe/recipes-extended/mozjs/mozjs-128/0004-use-asm-sgidefs.h.patch

Quoted 7 lines

Review

Quoted 7 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0004-use-asm-sgidefs.h.patch +1 -1
@@ -1,4 +1,4 @@
-From 1691939a22ec12245f008993e0b9a1b1dfb91e9c Mon Sep 17 00:00:00 2001
+From af704b888a91fc3a0f88b0ef2f36de1faaf7d6e2 Mon Sep 17 00:00:00 2001
 From: Andre McCurdy <[email protected]>
 Date: Sat, 30 Apr 2016 15:29:06 -0700
 Subject: [PATCH] use <asm/sgidefs.h>
(quoted diff) +0 -0

b/meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch

Quoted 3 lines
Quoted 3 lines

similarity index 97%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch rename to

meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch

Quoted 3 lines
Quoted 3 lines

index 67e23c5fcc..2359373999 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch
+++

b/meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch

Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0005-Add-RISCV32-support.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv32.patch +1 -1
@@ -1,4 +1,4 @@
-From 0cc41bc953974d4852b263708bf8d12f823ca8ad Mon Sep 17 00:00:00 2001
+From 8b7f96cc479c99a286591ac6dcd0be19bcf83b15 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sun, 24 Oct 2021 22:32:50 -0700
 Subject: [PATCH] Add RISCV32 support

diff --git

a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-util.configure-fix-one-occasionally-reproduced-confi.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0006-util.configure-fix-one-occasionally-reproduced-confi.patch

Quoted 2 lines
Quoted 2 lines

similarity index 96%
rename from

meta-oe/recipes-extended/mozjs/mozjs-128/0001-util.configure-fix-one-occasionally-reproduced-confi.patch

Quoted 1 line
Quoted 1 line

rename to

meta-oe/recipes-extended/mozjs/mozjs-128/0006-util.configure-fix-one-occasionally-reproduced-confi.patch

Quoted 2 lines
Quoted 2 lines

index d53cc2bd41..9cc7831876 100644
---

a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-util.configure-fix-one-occasionally-reproduced-confi.patch

Quoted 1 line
Quoted 1 line

+++

b/meta-oe/recipes-extended/mozjs/mozjs-128/0006-util.configure-fix-one-occasionally-reproduced-confi.patch

Quoted 6 lines

meta-oe/recipes-extended/mozjs/mozjs-128/0006-util.configure-fix-one-occasionally-reproduced-confi.patch line 4

Quoted 6 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0006-util.configure-fix-one-occasionally-reproduced-confi.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/0001-util.configure-fix-one-occasionally-reproduced-confi.patch +1 -1
@@ -1,4 +1,4 @@
-From 683cd23dd269509a1d913adb2b049b84771e0a94 Mon Sep 17 00:00:00 2001
+From 13b544e4ed51f41138bf200eb84552e169df87b0 Mon Sep 17 00:00:00 2001
 From: Changqing Li <[email protected]>
 Date: Thu, 11 Nov 2021 16:05:54 +0800
 Subject: [PATCH] util.configure: fix one occasionally reproduced

configure

Quoted 1 line
Quoted 1 line

diff --git

a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-rewrite-cargo-host-linker-in-python3.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0007-Rewrite-cargo-host-linker-in-python3.patch

Quoted 2 lines
Quoted 2 lines

similarity index 97%
rename from

meta-oe/recipes-extended/mozjs/mozjs-128/0001-rewrite-cargo-host-linker-in-python3.patch

Quoted 1 line
Quoted 1 line

rename to

meta-oe/recipes-extended/mozjs/mozjs-128/0007-Rewrite-cargo-host-linker-in-python3.patch

Quoted 2 lines
Quoted 2 lines

index 94e1651b33..9d6a89214b 100644
---

a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-rewrite-cargo-host-linker-in-python3.patch

Quoted 1 line
Quoted 1 line

+++

b/meta-oe/recipes-extended/mozjs/mozjs-128/0007-Rewrite-cargo-host-linker-in-python3.patch

Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0007-Rewrite-cargo-host-linker-in-python3.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/0001-rewrite-cargo-host-linker-in-python3.patch +1 -1
@@ -1,4 +1,4 @@
-From 6f6b78628a8edc834aa147c87ebce3eb8e670e7a Mon Sep 17 00:00:00 2001
+From 31d56eba10e7cf856a2a118e0523633195fe9ea2 Mon Sep 17 00:00:00 2001
 From: Changqing Li <[email protected]>
 Date: Thu, 18 Nov 2021 07:16:39 +0000
 Subject: [PATCH] Rewrite cargo-host-linker in python3

diff --git

a/meta-oe/recipes-extended/mozjs/mozjs-128/musl-disable-stackwalk.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch

Quoted 2 lines
Quoted 2 lines

similarity index 94%
rename from

meta-oe/recipes-extended/mozjs/mozjs-128/musl-disable-stackwalk.patch

Quoted 1 line
Quoted 1 line

rename to

meta-oe/recipes-extended/mozjs/mozjs-128/0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch

Quoted 2 lines
Quoted 2 lines

index 3d5452ce4d..91614291c7 100644
---

a/meta-oe/recipes-extended/mozjs/mozjs-128/musl-disable-stackwalk.patch

Quoted 1 line
Quoted 1 line

+++

b/meta-oe/recipes-extended/mozjs/mozjs-128/0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch

Quoted 6 lines

meta-oe/recipes-extended/mozjs/mozjs-128/0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch line 4

Quoted 6 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/musl-disable-stackwalk.patch +1 -1
@@ -1,4 +1,4 @@
-From d96e9a40e9da9163e0a4b3475178fe30c26deb19 Mon Sep 17 00:00:00 2001
+From fae21326f717f1c0031f3ad0ff4c3112ffb3a936 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Fri, 22 Sep 2023 22:59:56 +0000
 Subject: [PATCH] Musl does not have stack unwinder like glibc

therefore we can

Quoted 1 line
Quoted 1 line

diff --git

a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-add-arm-to-list-of-mozinline.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch

Quoted 2 lines
Quoted 2 lines

similarity index 95%
rename from

meta-oe/recipes-extended/mozjs/mozjs-128/0001-add-arm-to-list-of-mozinline.patch

Quoted 1 line
Quoted 1 line

rename to

meta-oe/recipes-extended/mozjs/mozjs-128/0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch

Quoted 2 lines
Quoted 2 lines

index 960b4593c2..a2e3c08edf 100644
---

a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-add-arm-to-list-of-mozinline.patch

Quoted 1 line
Quoted 1 line

+++

b/meta-oe/recipes-extended/mozjs/mozjs-128/0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch

Quoted 6 lines

meta-oe/recipes-extended/mozjs/mozjs-128/0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch line 4

Quoted 6 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/0001-add-arm-to-list-of-mozinline.patch +1 -1
@@ -1,4 +1,4 @@
-From 2d1fb35bd81acadc12cc077de86361ac59cee2f1 Mon Sep 17 00:00:00 2001
+From 7dc235e1558b087c69024ed40c6066bd8126f2a3 Mon Sep 17 00:00:00 2001
 From: Kai Kang <[email protected]>
 Date: Fri, 22 Sep 2023 22:59:59 +0000
 Subject: [PATCH] Backport patch from firefox bugzilla to fix compile

error for

Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch

Quoted 3 lines
Quoted 3 lines

similarity index 93%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/armv5.patch rename to

meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch

Quoted 3 lines
Quoted 3 lines

index 564f423fb4..e2e935eb03 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-128/armv5.patch
+++

b/meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch

Quoted 6 lines

meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch line 4

Quoted 6 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/armv5.patch +1 -1
@@ -1,4 +1,4 @@
-From 0dd6fdbf6a821898617f1bd8e57123be048c07f5 Mon Sep 17 00:00:00 2001
+From e94edc3eba7ea158806283d92ecd71ab87351838 Mon Sep 17 00:00:00 2001
 From: Ross Burton <[email protected]>
 Date: Mon, 16 Dec 2024 05:49:57 +0000
 Subject: [PATCH] The ISB instruction isn't available in ARMv5 or v6,

so guard

Quoted 1 line
Quoted 1 line

diff --git

a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch

Quoted 2 lines
Quoted 2 lines

similarity index 92%
rename from

meta-oe/recipes-extended/mozjs/mozjs-128/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch

Quoted 1 line
Quoted 1 line

rename to

meta-oe/recipes-extended/mozjs/mozjs-128/0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch

Quoted 2 lines
Quoted 2 lines

index 4fb7a28eeb..2d85e29005 100644
---

a/meta-oe/recipes-extended/mozjs/mozjs-128/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch

Quoted 1 line
Quoted 1 line

+++

b/meta-oe/recipes-extended/mozjs/mozjs-128/0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch

Quoted 7 lines

Review

Quoted 7 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch +1 -1
@@ -1,4 +1,4 @@
-From cbb5cc1022cc27edefc8eabbe21458cac9bda6fb Mon Sep 17 00:00:00 2001
+From 8290fd619582651334fbfdfe7be887d539ce0f2c Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sat, 23 Nov 2024 13:28:33 -0800
 Subject: [PATCH] Link with icu-uc to fix build with ICU-76
(quoted diff) +0 -0

b/meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch

Quoted 3 lines
Quoted 3 lines

similarity index 60%
rename from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch rename to

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch

Quoted 3 lines
Quoted 3 lines

index cb2dc66525..9cdb9fe913 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch
+++

b/meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch

Quoted 6 lines

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch line 4

Quoted 6 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +4 -1
@@ -1,12 +1,35 @@
-Recognise riscv64gc and riscv32gc as valid architectures
+From 93d586d712bf34c243c6174425c78d3ab274c6a0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 7 Jan 2025 15:17:16 -0800
+Subject: [PATCH] Recognise riscv64gc and riscv32gc as valid

architectures

Quoted 16 lines
Quoted 6 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +1 -0
 Rust uses above for architecture in tuples
 
 Upstream-Status: Pending
 Signed-off-by: Khem Raj <[email protected]>
+---

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch

Quoted 10 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +10 -0
+ build/autoconf/config.sub                                     | 2 +-
+ .../mozbuild/test/configure/test_toolchain_configure.py       | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/build/autoconf/config.sub b/build/autoconf/config.sub
+index 2c6a07ab3c..f7ee82380c 100755
+--- a/build/autoconf/config.sub
++++ b/build/autoconf/config.sub
+@@ -1236,7 +1236,7 @@ case $cpu-$vendor in
+                       | powerpc | powerpc64 | powerpc64le | powerpcle

| powerpcspe \

Quoted 3 lines

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch

Quoted 3 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +3 -0
+                       | pru \
+                       | pyramid \
+-                      | riscv | riscv32 | riscv32be | riscv64 |

riscv64be \

Quoted 1 line

Review line 23

Quoted 1 line
(quoted diff) +1 -0
++                      | riscv | riscv32 | riscv32be | riscv32gc |

riscv64 | riscv64be | riscv64gc \

Quoted 4 lines

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch

Quoted 4 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +4 -0
+                       | rl78 | romp | rs6000 | rx \
+                       | s390 | s390x \
+                       | score \
+diff --git

a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py

Quoted 2 lines

Review line 29

Quoted 2 lines
(quoted diff) +1 -0
+index 1be0d02e54..a476d787b2 100644
 ---

a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py

Quoted 1 line

Review line 30

Quoted 1 line
(quoted diff) +0 -0
 +++

b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py

Quoted 2 lines

Review line 31

Quoted 2 lines
(quoted diff) +1 -1
-@@ -1327,6 +1327,10 @@ class LinuxCrossCompileToolchainTest(Bas
+@@ -1327,6 +1327,10 @@ class

LinuxCrossCompileToolchainTest(BaseToolchainTest):

Quoted 2 lines

Review line 33

Quoted 2 lines
(quoted diff) +0 -0
          "mips-unknown-linux-gnu": big_endian + {"__mips__": 1},
          "riscv32-unknown-linux-gnu": little_endian + {"__riscv": 1,

"__riscv_xlen": 32},

Quoted 1 line

Review line 34

Quoted 1 line
(quoted diff) +0 -0
          "riscv64-unknown-linux-gnu": little_endian + {"__riscv": 1,

"__riscv_xlen": 64},

Quoted 8 lines

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch Signed-off-by: Khem Raj <[email protected]> · line 23

Quoted 8 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +0 -4
@@ -17,14 +40,3 @@ Signed-off-by: Khem Raj <[email protected]>
          "sh4-unknown-linux-gnu": little_endian + {"__sh__": 1},
      }
 
---- a/build/autoconf/config.sub
-+++ b/build/autoconf/config.sub
-@@ -1236,7 +1236,7 @@ case $cpu-$vendor in
-                       | powerpc | powerpc64 | powerpc64le | powerpcle

| powerpcspe \

Quoted 3 lines

meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch Signed-off-by: Khem Raj <[email protected]>

Quoted 3 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +0 -3
-                       | pru \
-                       | pyramid \
--                      | riscv | riscv32 | riscv32be | riscv64 |

riscv64be \

Quoted 1 line

Review Signed-off-by: Khem Raj <[email protected]> · line 27

Quoted 1 line
(quoted diff) +0 -1
-+                      | riscv | riscv32 | riscv32be | riscv32gc |

riscv64 | riscv64be | riscv64gc \

Quoted 4 lines
Quoted 4 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch renamed from meta-oe/recipes-extended/mozjs/mozjs-128/riscv.patch +0 -3
-                       | rl78 | romp | rs6000 | rx \
-                       | s390 | s390x \
-                       | score \

diff --git

a/meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch b/meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch

Quoted 4 lines
Quoted 4 lines

new file mode 100644
index 0000000000..1900c17f74
--- /dev/null
+++

b/meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch

Quoted 7 lines

meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch line 6

Quoted 7 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch new file +6 -0
@@ -0,0 +1,30 @@
+From 0f903fa0be39e39083599306018fa7bd724dba9d Mon Sep 17 00:00:00 2001
+From: Ankur Tyagi <[email protected]>
+Date: Wed, 7 Jan 2026 20:26:53 +1300
+Subject: [PATCH] Fix build error with musl
+
+_Unwind_GetIP symbol is not implemented by musl, so use it only with

libc.

Quoted 2 lines

Review line 8

Quoted 2 lines
(quoted diff) +2 -0
+
+mozglue/misc/StackWalk.o: in function

`unwind_callback(_Unwind_Context*, void*)':

Quoted 1 line

Review line 9

Quoted 1 line
(quoted diff) +1 -0
+|

/usr/src/debug/mozjs-128/128.5.2/mozglue/misc/StackWalk.cpp:810:(.text._ZL15unwind_callbackP15_Unwind_ContextPv+0x4):
undefined reference to `_Unwind_GetIP'

Quoted 2 lines

Review line 11

Quoted 2 lines
(quoted diff) +2 -0
+
+Reference:

https://github.com/OSSystems/meta-browser/commit/bb8662912354dae13634c0ec35c3803c344b1e72

Quoted 12 lines
Quoted 12 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch new file +12 -0
+Upstream-Status: Inappropriate [musl-specific]
+Signed-off-by: Ankur Tyagi <[email protected]>
+---
+ mozglue/misc/StackWalk.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp
+index d3d9208fdb..9f7155a4f7 100644
+--- a/mozglue/misc/StackWalk.cpp
++++ b/mozglue/misc/StackWalk.cpp
+@@ -696,7 +696,7 @@ MFBT_API bool MozDescribeCodeAddress(void* aPC,
+ //
Quoted 8 lines

meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch line 28

Quoted 5 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch new file +5 -0
+ // Changes to to OS/Architecture support here should be reflected in
+ // build/moz.configure/memory.configure
+-#elif HAVE_DLADDR &&                                           \
++#elif defined(__GLIBC__) && HAVE_DLADDR &&                     \
+     (HAVE__UNWIND_BACKTRACE || MOZ_STACKWALK_SUPPORTS_LINUX || \

I am wondering if HAVE__UNWIND_BACKTRACE should have been false for musl

already. so need to

Quoted 2 lines

check __GLIBC__ is not needed perhaps

Quoted 10 lines

Hi Khem,

Seems HAVE__UNWIND_BACKTRACE is not false for musl, I was getting build error.
Following commit[1] is also checking for the environment

[1]
https://github.com/openembedded/meta-openembedded/commit/82c7bdd4cb4b0f1176afe0ad6a599f9db49f7055

OK, in that case lets add the same check here as well.

Quoted 59 lines

cheers
Ankur

Quoted 4 lines

Review

Quoted 4 lines
meta-oe/recipes-extended/mozjs/mozjs-128/0013-Fix-build-error-with-musl.patch new file +2 -0
+      MOZ_STACKWALK_SUPPORTS_MACOSX)
+
(quoted diff) +0 -0

b/meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb

Quoted 4 lines

meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb SRC_URI = "

Quoted 4 lines

index ceb81d07e5..fbbe3749ba 100644

meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb +0 -0
@@ -8,14 +8,15 @@ SRC_URI = "

https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/fire

Quoted 1 line
Quoted 1 line

file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \

Quoted 1 line
Quoted 1 line

file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \

Quoted 3 lines

meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb

Quoted 3 lines
            file://0004-use-asm-sgidefs.h.patch \
meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb +0 -2
-           file://riscv32.patch \
-

file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \

Quoted 5 lines

meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/fire

Quoted 5 lines
meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb +0 -5
-           file://0001-rewrite-cargo-host-linker-in-python3.patch  \
-           file://musl-disable-stackwalk.patch \
-           file://0001-add-arm-to-list-of-mozinline.patch \
-           file://armv5.patch \
-           file://0001-Link-with-icu-uc-to-fix-build-with-ICU-76.patch

\

Quoted 3 lines

meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/fire

Quoted 3 lines
meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb +2 -1
-           file://riscv.patch \
+           file://0005-Add-RISCV32-support.patch \
+

file://0006-util.configure-fix-one-occasionally-reproduced-confi.patch \

Quoted 2 lines

meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb

Quoted 2 lines
meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb +2 -0
+           file://0007-Rewrite-cargo-host-linker-in-python3.patch  \
+

file://0008-Musl-does-not-have-stack-unwinder-like-glibc-therefo.patch \

Quoted 1 line
Quoted 1 line

+

file://0009-Backport-patch-from-firefox-bugzilla-to-fix-compile-.patch \

Quoted 1 line
Quoted 1 line

+

file://0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch \

Quoted 1 line
Quoted 1 line

+ file://0011-Link-with-icu-uc-to-fix-build-with-ICU-76.patch

\

Quoted 1 line
Quoted 1 line

+

file://0012-Recognise-riscv64gc-and-riscv32gc-as-valid-architect.patch \

Quoted 3 lines
Quoted 3 lines
+           file://0013-Fix-build-error-with-musl.patch \
            "

SRC_URI[sha256sum] =

"25d633eb81499cbda44b8c64fa1c1a5879d55024b864ef495d4997154d68358f"

Quoted 5 lines
Quoted 5 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#123230):

https://lists.openembedded.org/g/openembedded-devel/message/123230

Quoted 3 lines
Quoted 3 lines

Mute This Topic: https://lists.openembedded.org/mt/117139023/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub

[[email protected]]

Quoted 2 lines
Quoted 2 lines

-=-=-=-=-=-=-=-=-=-=-=-