blob: 02f5e5c7e1ed99b9365027c0fa8d5f7adca81e05 [file] [log] [blame]
Andrew Geisslerc5535c92023-01-27 16:10:19 -06001Backport patch from firefox bugzilla to fix compile error for qemuarm with
2some armv7ve tunes such as 'armv7vethf' and 'armv7vet-vfpv3d16':
3
4| /path/to/build/tmp/work/armv7vet2hf-vfp-poky-linux-gnueabi/mozjs-102/102.5.0-r0/build/js/src/jit/AtomicOperationsGenerated.h:240:17:
5 error: 'asm' operand has impossible constraints
6| 240 | asm volatile (
7| | ^~~
8
9Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1761665]
10
11Signed-off-by: Kai Kang <kai.kang@windriver.com>
12
13diff --git a/js/src/jit/GenerateAtomicOperations.py b/js/src/jit/GenerateAtomicOperations.py
14index d8a38a0..65f91ab 100644
15--- a/js/src/jit/GenerateAtomicOperations.py
16+++ b/js/src/jit/GenerateAtomicOperations.py
17@@ -856,7 +856,7 @@ def generate_atomics_header(c_out):
18
19 # Work around a GCC issue on 32-bit x86 by adding MOZ_NEVER_INLINE.
20 # See bug 1756347.
21- if is_gcc and cpu_arch == "x86":
22+ if is_gcc and cpu_arch in ("x86", "arm"):
23 contents = contents.replace("INLINE_ATTR", "MOZ_NEVER_INLINE inline")
24 else:
25 contents = contents.replace("INLINE_ATTR", "inline")