| 1 |
From: Simon McVittie <[email protected]> |
| 2 |
Date: Tue, 23 Aug 2022 20:57:15 +0100 |
| 3 |
Subject: Bug 1761665 - Extend x86 workaround to 32-bit ARM |
| 4 |
|
| 5 |
If we don't do this, Spidermonkey (mozjs) on ARMv7 fails to compile in |
| 6 |
some configurations. |
| 7 |
|
| 8 |
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1761665 |
| 9 |
Bug-Debian: https://bugs.debian.org/1017962 |
| 10 |
--- |
| 11 |
js/src/jit/GenerateAtomicOperations.py | 6 +++--- |
| 12 |
1 file changed, 3 insertions(+), 3 deletions(-) |
| 13 |
|
| 14 |
diff --git a/js/src/jit/GenerateAtomicOperations.py b/js/src/jit/GenerateAtomicOperations.py |
| 15 |
index 9c8031a..71b2d3a 100644 |
| 16 |
--- a/js/src/jit/GenerateAtomicOperations.py |
| 17 |
+++ b/js/src/jit/GenerateAtomicOperations.py |
| 18 |
@@ -890,9 +890,9 @@ def generate_atomics_header(c_out): |
| 19 |
"constexpr size_t JS_GENERATED_ATOMICS_WORDSIZE = " + str(wordsize) + ";\n" |
| 20 |
) |
| 21 |
|
| 22 |
- # Work around a GCC issue on 32-bit x86 by adding MOZ_NEVER_INLINE. |
| 23 |
- # See bug 1756347. |
| 24 |
- if is_gcc and cpu_arch == "x86": |
| 25 |
+ # Work around a GCC issue on some 32-bit architectures by adding |
| 26 |
+ # MOZ_NEVER_INLINE. See bugs 1756347, 1761665. |
| 27 |
+ if is_gcc and cpu_arch in ("x86", 'arm'): |
| 28 |
contents = contents.replace("INLINE_ATTR", "MOZ_NEVER_INLINE inline") |
| 29 |
else: |
| 30 |
contents = contents.replace("INLINE_ATTR", "inline") |