1 --- firefox-91.7.1/build/moz.configure/init.configure.orig 2022-04-04 16:33:40.528846096 +0200
2 +++ firefox-91.7.1/build/moz.configure/init.configure 2022-04-04 16:35:05.058388323 +0200
3 @@ -728,6 +728,8 @@ def split_triplet(triplet, allow_msvc=Fa
5 elif cpu in ("x86_64", "ia64"):
7 + if os.endswith('gnux32'):
8 + canonical_cpu = 'x32'
10 elif cpu in ("s390", "s390x"):
12 --- firefox-60.7.0/mfbt/RandomNum.cpp.orig 2019-05-24 22:04:38.196451155 +0200
13 +++ firefox-60.7.0/mfbt/RandomNum.cpp 2019-05-24 22:10:43.717804289 +0200
16 // Older glibc versions don't define SYS_getrandom, so we define it here if
17 // it's not available. See bug 995069.
18 -# if defined(__x86_64__)
19 +# if defined(__x86_64__) && defined(__ILP32__)
20 +# define GETRANDOM_NR (__X32_SYSCALL_BIT + 318)
21 +# elif defined(__x86_64__)
22 # define GETRANDOM_NR 318
23 # elif defined(__i386__)
24 # define GETRANDOM_NR 355
25 --- firefox-91.7.1/python/mozbuild/mozbuild/configure/constants.py.orig 2022-04-04 16:33:42.568845879 +0200
26 +++ firefox-91.7.1/python/mozbuild/mozbuild/configure/constants.py 2022-04-04 16:44:51.148857314 +0200
27 @@ -60,6 +60,7 @@ CPU_bitness = {
35 @@ -78,8 +79,9 @@ WindowsBinaryType = EnumString.subclass(
36 # The order of those checks matter
37 CPU_preprocessor_checks = OrderedDict(
39 + ("x32", "__x86_64__ && __ILP32__"),
40 ("x86", "__i386__ || _M_IX86"),
41 - ("x86_64", "__x86_64__ || _M_X64"),
42 + ("x86_64", "(__x86_64__ && __LP64__) || _M_X64"),
43 ("arm", "__arm__ || _M_ARM"),
44 ("aarch64", "__aarch64__ || _M_ARM64"),
46 --- firefox-68.7.0/js/src/vm/BigIntType.cpp~ 2020-04-03 21:29:59.000000000 +0200
47 +++ firefox-68.7.0/js/src/vm/BigIntType.cpp 2020-05-01 11:22:53.296439915 +0200
49 BigInt::Digit BigInt::digitDiv(Digit high, Digit low, Digit divisor,
51 MOZ_ASSERT(high < divisor, "division must not overflow");
52 -#if defined(__x86_64__)
53 +#if defined(__x86_64__) && !defined(__ILP32__)
56 __asm__("divq %[divisor]"
57 --- firefox-91.7.1/js/src/gc/GC.cpp.orig 2022-04-04 16:32:41.617512402 +0200
58 +++ firefox-91.7.1/js/src/gc/GC.cpp 2022-04-04 16:45:29.361453166 +0200
59 @@ -303,8 +303,10 @@ static_assert(js::detail::LIFO_ALLOC_ALI
60 "CellFlagBitsReservedForGC should support LifoAlloc");
61 static_assert(CellAlignBytes >= MinFirstWordAlignment,
62 "CellFlagBitsReservedForGC should support gc::Cell");
63 +#ifndef JS_CODEGEN_NONE
64 static_assert(js::jit::CodeAlignment >= MinFirstWordAlignment,
65 "CellFlagBitsReservedForGC should support JIT code");
67 static_assert(js::gc::JSClassAlignBytes >= MinFirstWordAlignment,
68 "CellFlagBitsReservedForGC should support JSClass pointers");
69 static_assert(js::ScopeDataAlignBytes >= MinFirstWordAlignment,
70 --- firefox-91.7.1/js/src/wasm/WasmFrame.h.orig 2022-03-13 15:31:41.000000000 +0100
71 +++ firefox-91.7.1/js/src/wasm/WasmFrame.h 2022-04-05 19:49:49.624104638 +0200
72 @@ -230,7 +230,7 @@ class DebugFrame {
73 // Avoid -Wunused-private-field warnings.
75 #if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_ARM) || \
76 - defined(JS_CODEGEN_X86) || defined(__wasi__)
77 + defined(JS_CODEGEN_X86) || defined(__wasi__) || (defined(JS_CODEGEN_NONE) && defined(__ILP32__))
78 // See alignmentStaticAsserts(). For MIPS32, ARM32 and X86 DebugFrame is only
79 // 4-byte aligned, so we add another word to get up to 8-byte