aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/mozjs/mozjs-91/0005-nojit-32bit-arch-fix.patch
blob: f308b4863f83d3597a8a94266772bc1233bd867b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Fix build when JIT is disabled on 32bit systems

This fixes a compile time assert
js/src/wasm/WasmFrame.cpp:57:3: error: static_assert failed due to requirement '(__builtin_offsetof(js::wasm::DebugFrame, frame_) + sizeof(js::wasm::Frame)) % Alignment == 0' "Aligned after pushing DebugFrame"
  static_assert((offsetof(DebugFrame, frame_) + sizeof(Frame)) % Alignment == 0,
  ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>

--- a/js/src/wasm/WasmFrame.h
+++ b/js/src/wasm/WasmFrame.h
@@ -230,6 +230,8 @@ class DebugFrame {
   // Avoid -Wunused-private-field warnings.
  protected:
 #if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_ARM) || \
+    (defined(JS_CODEGEN_NONE) && \
+     (defined(__riscv) && __riscv_xlen == 32) || defined(__mips__)) || \
     defined(JS_CODEGEN_X86) || defined(__wasi__)
   // See alignmentStaticAsserts().  For MIPS32, ARM32 and X86 DebugFrame is only
   // 4-byte aligned, so we add another word to get up to 8-byte