openembedded-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [meta-oe][PATCH] mozjs: Fix build for 32bit systems disabling JIT
@ 2021-10-26 17:38 Khem Raj
  0 siblings, 0 replies; only message in thread
From: Khem Raj @ 2021-10-26 17:38 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../mozjs/mozjs/nojit-32bit-arch-fix.patch    | 21 +++++++++++++++++++
 .../mozjs/mozjs/riscv32.patch                 | 10 ---------
 .../recipes-extended/mozjs/mozjs_91.2.0.bb    |  1 +
 3 files changed, 22 insertions(+), 10 deletions(-)
 create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/nojit-32bit-arch-fix.patch

diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/nojit-32bit-arch-fix.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/nojit-32bit-arch-fix.patch
new file mode 100644
index 0000000000..f308b4863f
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/nojit-32bit-arch-fix.patch
@@ -0,0 +1,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
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/riscv32.patch b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/riscv32.patch
index 1f1f93987a..fe9c332a00 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/riscv32.patch
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/riscv32.patch
@@ -43,13 +43,3 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
          "riscv64-unknown-linux-gnu": little_endian + {"__riscv": 1, "__riscv_xlen": 64},
          "sh4-unknown-linux-gnu": little_endian + {"__sh__": 1},
      }
---- a/js/src/wasm/WasmFrame.h
-+++ b/js/src/wasm/WasmFrame.h
-@@ -230,6 +230,7 @@ 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(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
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.2.0.bb b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.2.0.bb
index 45f0145313..a1a5ddc3b0 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.2.0.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.2.0.bb
@@ -11,6 +11,7 @@ SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/fire
            file://fix-musl-build.patch \
            file://0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \
            file://riscv32.patch \
+           file://nojit-32bit-arch-fix.patch \
            "
 SRC_URI[sha256sum] = "3ef3cfd321d0c2c80ee1b41b8baf7a1ea4daf93c29e1377274933440ff5e42c3"
 
-- 
2.33.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-26 17:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 17:38 [meta-oe][PATCH] mozjs: Fix build for 32bit systems disabling JIT Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).