meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs-128/0010-The-ISB-instruction-isn-t-available-in-ARMv5-or-v6-s.patch
Ankur Tyagi 30942cebe8
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>
2026-01-12 08:53:46 -08:00

29 lines
1.0 KiB
Diff

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
it's use to fix the build on qemuarmv5.
Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
js/src/jit/arm/Architecture-arm.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/js/src/jit/arm/Architecture-arm.cpp b/js/src/jit/arm/Architecture-arm.cpp
index d4c5026705..fc0455eaff 100644
--- a/js/src/jit/arm/Architecture-arm.cpp
+++ b/js/src/jit/arm/Architecture-arm.cpp
@@ -528,9 +528,11 @@ void FlushICache(void* code, size_t size) {
void FlushExecutionContext() {
#ifndef JS_SIMULATOR_ARM
+#if __ARM_ARCH >= 7
// Ensure that any instructions already in the pipeline are discarded and
// reloaded from the icache.
asm volatile("isb\n" : : : "memory");
+#endif
#else
// We assume the icache flushing routines on other platforms take care of this
#endif