mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-01-11 15:11:26 +00:00
mozjs-128: Fix build error with arm and musl
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] bb86629123
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -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 <alex@linutronix.de>
|
||||
Date: Fri, 1 Oct 2021 13:00:24 +0200
|
||||
Subject: [PATCH] Cargo.toml: do not abort on panic
|
||||
|
||||
@@ -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 <alex@linutronix.de>
|
||||
Date: Fri, 1 Oct 2021 13:01:10 +0200
|
||||
Subject: [PATCH] moz.configure: do not look for llvm-objdump
|
||||
|
||||
@@ -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 <alex@linutronix.de>
|
||||
Date: Fri, 1 Oct 2021 13:02:17 +0200
|
||||
Subject: [PATCH] rust.configure: do not try to find a suitable upstream target
|
||||
|
||||
@@ -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 <amccurdy@gmail.com>
|
||||
Date: Sat, 30 Apr 2016 15:29:06 -0700
|
||||
Subject: [PATCH] use <asm/sgidefs.h>
|
||||
|
||||
@@ -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 <raj.khem@gmail.com>
|
||||
Date: Sun, 24 Oct 2021 22:32:50 -0700
|
||||
Subject: [PATCH] Add RISCV32 support
|
||||
@@ -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 <changqing.li@windriver.com>
|
||||
Date: Thu, 11 Nov 2021 16:05:54 +0800
|
||||
Subject: [PATCH] util.configure: fix one occasionally reproduced configure
|
||||
@@ -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 <changqing.li@windriver.com>
|
||||
Date: Thu, 18 Nov 2021 07:16:39 +0000
|
||||
Subject: [PATCH] Rewrite cargo-host-linker in python3
|
||||
@@ -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 <raj.khem@gmail.com>
|
||||
Date: Fri, 22 Sep 2023 22:59:56 +0000
|
||||
Subject: [PATCH] Musl does not have stack unwinder like glibc therefore we can
|
||||
@@ -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 <kai.kang@windriver.com>
|
||||
Date: Fri, 22 Sep 2023 22:59:59 +0000
|
||||
Subject: [PATCH] Backport patch from firefox bugzilla to fix compile error for
|
||||
@@ -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 <ross.burton@arm.com>
|
||||
Date: Mon, 16 Dec 2024 05:49:57 +0000
|
||||
Subject: [PATCH] The ISB instruction isn't available in ARMv5 or v6, so guard
|
||||
@@ -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 <raj.khem@gmail.com>
|
||||
Date: Sat, 23 Nov 2024 13:28:33 -0800
|
||||
Subject: [PATCH] Link with icu-uc to fix build with ICU-76
|
||||
@@ -1,22 +1,19 @@
|
||||
Recognise riscv64gc and riscv32gc as valid architectures
|
||||
From 93d586d712bf34c243c6174425c78d3ab274c6a0 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
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 <raj.khem@gmail.com>
|
||||
--- 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
|
||||
"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},
|
||||
+ "riscv32gc-unknown-linux-gnu": little_endian
|
||||
+ + {"__riscv": 1, "__riscv_xlen": 32},
|
||||
+ "riscv64gc-unknown-linux-gnu": little_endian
|
||||
+ + {"__riscv": 1, "__riscv_xlen": 64},
|
||||
"sh4-unknown-linux-gnu": little_endian + {"__sh__": 1},
|
||||
}
|
||||
|
||||
---
|
||||
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
|
||||
@@ -28,3 +25,18 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
| 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(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},
|
||||
+ "riscv32gc-unknown-linux-gnu": little_endian
|
||||
+ + {"__riscv": 1, "__riscv_xlen": 32},
|
||||
+ "riscv64gc-unknown-linux-gnu": little_endian
|
||||
+ + {"__riscv": 1, "__riscv_xlen": 64},
|
||||
"sh4-unknown-linux-gnu": little_endian + {"__sh__": 1},
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 0f903fa0be39e39083599306018fa7bd724dba9d Mon Sep 17 00:00:00 2001
|
||||
From: Ankur Tyagi <ankur.tyagi85@gmail.com>
|
||||
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 <ankur.tyagi85@gmail.com>
|
||||
---
|
||||
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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user