]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-140421: Disable perf trampoline on older macOS (#144647)
authorJoshua Root <jmr@macports.org>
Wed, 11 Feb 2026 04:27:16 +0000 (15:27 +1100)
committerGitHub <noreply@github.com>
Wed, 11 Feb 2026 04:27:16 +0000 (23:27 -0500)
Trampoline requires clock_gettime() which was added in macOS 10.12.

Misc/NEWS.d/next/Build/2026-02-10-06-31-29.gh-issue-140421.vxosUx.rst [new file with mode: 0644]
configure
configure.ac

diff --git a/Misc/NEWS.d/next/Build/2026-02-10-06-31-29.gh-issue-140421.vxosUx.rst b/Misc/NEWS.d/next/Build/2026-02-10-06-31-29.gh-issue-140421.vxosUx.rst
new file mode 100644 (file)
index 0000000..cab48f1
--- /dev/null
@@ -0,0 +1 @@
+Disable the perf trampoline on older macOS versions where it cannot be built.
index cd8983683333cd12301ba62c30ab476ddb71487f..73a758384553b2978250e4a9742e7531367b37e9 100755 (executable)
--- a/configure
+++ b/configure
@@ -13873,7 +13873,13 @@ case $PLATFORM_TRIPLET in #(
   aarch64-linux-gnu) :
     perf_trampoline=yes ;; #(
   darwin) :
-    perf_trampoline=yes ;; #(
+    case $MACOSX_DEPLOYMENT_TARGET in #(
+  10.[0-9]|10.1[0-1]) :
+    perf_trampoline=no ;; #(
+  *) :
+    perf_trampoline=yes
+             ;;
+esac ;; #(
   *) :
     perf_trampoline=no
  ;;
index e9b45d459fee2adc8a68ede4cc5a7bb46e73bc22..2ba63b2a8a05e08e81d9fd069e7b75b33a3cdb23 100644 (file)
@@ -3717,7 +3717,10 @@ AC_MSG_CHECKING([perf trampoline])
 AS_CASE([$PLATFORM_TRIPLET],
   [x86_64-linux-gnu], [perf_trampoline=yes],
   [aarch64-linux-gnu], [perf_trampoline=yes],
-  [darwin], [perf_trampoline=yes],
+  [darwin], [AS_CASE([$MACOSX_DEPLOYMENT_TARGET],
+                [[10.[0-9]|10.1[0-1]]], [perf_trampoline=no],
+                [perf_trampoline=yes]
+            )],
   [perf_trampoline=no]
 )
 AC_MSG_RESULT([$perf_trampoline])