diff --git a/srcpkgs/mozjs78/patches/build-non-jit-32bit.patch b/srcpkgs/mozjs78/patches/build-non-jit-32bit.patch new file mode 100644 index 0000000000..f2cf04d79a --- /dev/null +++ b/srcpkgs/mozjs78/patches/build-non-jit-32bit.patch @@ -0,0 +1,14 @@ +On 32-bit systems without JIT, the GC doesn't like 4-byte alignment, +so enforce a stricter one. + +--- a/js/src/jit/none/MacroAssembler-none.h ++++ b/js/src/jit/none/MacroAssembler-none.h +@@ -100,7 +100,7 @@ static constexpr Register WasmTlsReg{Registers::invalid_reg}; + static constexpr Register WasmJitEntryReturnScratch{Registers::invalid_reg}; + + static constexpr uint32_t ABIStackAlignment = 4; +-static constexpr uint32_t CodeAlignment = sizeof(void*); ++static constexpr uint32_t CodeAlignment = 8; + static constexpr uint32_t JitStackAlignment = 8; + static constexpr uint32_t JitStackValueAlignment = + JitStackAlignment / sizeof(Value);