File: Bug-1761665-Extend-x86-workaround-to-32-bit-ARM.patch

package info (click to toggle)
mozjs140 140.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,216,540 kB
  • sloc: javascript: 2,267,091; cpp: 1,423,664; python: 966,254; ansic: 632,256; xml: 115,965; sh: 15,392; asm: 13,399; makefile: 10,455; yacc: 4,504; perl: 2,223; lex: 1,414; ruby: 1,064; exp: 756; java: 185; sql: 66; sed: 18
file content (30 lines) | stat: -rw-r--r-- 1,300 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: Simon McVittie <smcv@debian.org>
Date: Tue, 23 Aug 2022 20:57:15 +0100
Subject: Bug 1761665 - Extend x86 workaround to 32-bit ARM

If we don't do this, Spidermonkey (mozjs) on ARMv7 fails to compile in
some configurations.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1761665
Bug-Debian: https://bugs.debian.org/1017962
---
 js/src/jit/GenerateAtomicOperations.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/js/src/jit/GenerateAtomicOperations.py b/js/src/jit/GenerateAtomicOperations.py
index 9c8031a..71b2d3a 100644
--- a/js/src/jit/GenerateAtomicOperations.py
+++ b/js/src/jit/GenerateAtomicOperations.py
@@ -890,9 +890,9 @@ def generate_atomics_header(c_out):
             "constexpr size_t JS_GENERATED_ATOMICS_WORDSIZE = " + str(wordsize) + ";\n"
         )
 
-        # Work around a GCC issue on 32-bit x86 by adding MOZ_NEVER_INLINE.
-        # See bug 1756347.
-        if is_gcc and cpu_arch == "x86":
+        # Work around a GCC issue on some 32-bit architectures by adding
+        # MOZ_NEVER_INLINE. See bugs 1756347, 1761665.
+        if is_gcc and cpu_arch in ("x86", 'arm'):
             contents = contents.replace("INLINE_ATTR", "MOZ_NEVER_INLINE inline")
         else:
             contents = contents.replace("INLINE_ATTR", "inline")