From 114d0bd7ab1f2506459c2fb8c22ab4b2535abf02 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Thu, 10 Apr 2025 07:54:16 -0700 Subject: [PATCH 1/2] [3.13] gh-130834: Fix free-threaded build with JIT for arm --- Tools/jit/_targets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tools/jit/_targets.py b/Tools/jit/_targets.py index cebfad5a7467d2..6f6a0530e69458 100644 --- a/Tools/jit/_targets.py +++ b/Tools/jit/_targets.py @@ -521,7 +521,11 @@ 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"] From a60f9851c75df22bcc97e071315de1d997483398 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Thu, 10 Apr 2025 07:59:58 -0700 Subject: [PATCH 2/2] lint --- Tools/jit/_targets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tools/jit/_targets.py b/Tools/jit/_targets.py index 6f6a0530e69458..8387258ab320d4 100644 --- a/Tools/jit/_targets.py +++ b/Tools/jit/_targets.py @@ -521,7 +521,8 @@ 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",