From 793293dcb944c0d71824e9a9a2548ece304e4e2f Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Fri, 11 Apr 2025 06:52:46 -0700 Subject: [PATCH] [3.13] gh-130834: Fix free-threaded build with JIT for aarch64 linux (#132368) * [3.13] gh-130834: Fix free-threaded build with JIT for arm * lint --- Tools/jit/_targets.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Tools/jit/_targets.py b/Tools/jit/_targets.py index 50b5d923a355..fb30bdb774a3 100644 --- a/Tools/jit/_targets.py +++ b/Tools/jit/_targets.py @@ -525,7 +525,12 @@ def get_target(host: str) -> _COFF | _ELF | _MachO: args = ["-fms-runtime-lib=dll"] target = _COFF(host, alignment=8, args=args) elif re.fullmatch(r"aarch64-.*-linux-gnu", host): - args = ["-fpic"] + args = [ + "-fpic", + # On aarch64 Linux, intrinsics were being emitted and this flag + # was required to disable them. + "-mno-outline-atomics", + ] target = _ELF(host, alignment=8, args=args) elif re.fullmatch(r"i686-pc-windows-msvc", host): args = ["-DPy_NO_ENABLE_SHARED"] -- 2.47.3