From 688968d3d1453603503d25cc093e911b7c9a1eb6 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Mon, 15 Dec 2025 20:22:21 +0200 Subject: [PATCH 1/4] fix build --- configure | 10 +++++++++- configure.ac | 9 +++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 8af7ee0e042e81..98175608ffa45a 100755 --- a/configure +++ b/configure @@ -16110,6 +16110,15 @@ else aarch64-apple-ios-simulator) CARGO_TARGET="aarch64-apple-ios-sim" ;; + *-apple-darwin*) + cargo_host="$host" + case "$cargo_host" in + arm64-apple-*) + cargo_host="aarch64${cargo_host#arm64}" + ;; + esac + CARGO_TARGET="${cargo_host%%-apple-darwin*}-apple-darwin" + ;; *) CARGO_TARGET="$host" ;; @@ -36175,4 +36184,3 @@ if test "$ac_cv_header_stdatomic_h" != "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Your compiler or platform does have a working C11 stdatomic.h. A future version of Python may require stdatomic.h." >&5 printf "%s\n" "$as_me: Your compiler or platform does have a working C11 stdatomic.h. A future version of Python may require stdatomic.h." >&6;} fi - diff --git a/configure.ac b/configure.ac index a3cc99c8add8c3..91633ebbf342ae 100644 --- a/configure.ac +++ b/configure.ac @@ -4333,6 +4333,15 @@ else aarch64-apple-ios-simulator) CARGO_TARGET="aarch64-apple-ios-sim" ;; + *-apple-darwin*) + cargo_host="$host" + case "$cargo_host" in + arm64-apple-*) + cargo_host="aarch64${cargo_host#arm64}" + ;; + esac + CARGO_TARGET="${cargo_host%%-apple-darwin*}-apple-darwin" + ;; *) CARGO_TARGET="$host" ;; From 8f3946ab251e8453f92e0a2f1a9f7af112545452 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Mon, 15 Dec 2025 20:27:37 +0200 Subject: [PATCH 2/4] Adjust makesetup --- Modules/makesetup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/makesetup b/Modules/makesetup index 586e26dd5891b0..bd33c8fb2804c7 100755 --- a/Modules/makesetup +++ b/Modules/makesetup @@ -282,7 +282,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' | # there's actually only one obj, so just set it to the lib for lib in $libs do - objs="target/\$(CARGO_TARGET_DIR)/$lib" + objs="target/\$(if \$(CARGO_TARGET),\$(CARGO_TARGET)/\$(CARGO_TARGET_DIR),\$(CARGO_TARGET_DIR))/$lib" done libs= # depends on the headers through cpython-sys From dea8c3d11a9c4ee038809f739bb91fca02dd4b62 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Mon, 15 Dec 2025 20:38:22 +0200 Subject: [PATCH 3/4] Check if this helps for android --- configure | 4 ++++ configure.ac | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/configure b/configure index 98175608ffa45a..56a85d9b813e55 100755 --- a/configure +++ b/configure @@ -16119,6 +16119,10 @@ else esac CARGO_TARGET="${cargo_host%%-apple-darwin*}-apple-darwin" ;; + *-linux-android*) + cargo_host="${host/-unknown-/-}" + CARGO_TARGET="$cargo_host" + ;; *) CARGO_TARGET="$host" ;; diff --git a/configure.ac b/configure.ac index 91633ebbf342ae..6d26503afb075f 100644 --- a/configure.ac +++ b/configure.ac @@ -4342,6 +4342,10 @@ else esac CARGO_TARGET="${cargo_host%%-apple-darwin*}-apple-darwin" ;; + *-linux-android*) + cargo_host="${host/-unknown-/-}" + CARGO_TARGET="$cargo_host" + ;; *) CARGO_TARGET="$host" ;; From 640feb00b2582bb40b86875b989411549a92d48a Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Tue, 16 Dec 2025 19:18:44 +0200 Subject: [PATCH 4/4] Remove android workaround & we'll deal with that later --- configure | 4 ---- configure.ac | 4 ---- 2 files changed, 8 deletions(-) diff --git a/configure b/configure index 56a85d9b813e55..98175608ffa45a 100755 --- a/configure +++ b/configure @@ -16119,10 +16119,6 @@ else esac CARGO_TARGET="${cargo_host%%-apple-darwin*}-apple-darwin" ;; - *-linux-android*) - cargo_host="${host/-unknown-/-}" - CARGO_TARGET="$cargo_host" - ;; *) CARGO_TARGET="$host" ;; diff --git a/configure.ac b/configure.ac index 6d26503afb075f..91633ebbf342ae 100644 --- a/configure.ac +++ b/configure.ac @@ -4342,10 +4342,6 @@ else esac CARGO_TARGET="${cargo_host%%-apple-darwin*}-apple-darwin" ;; - *-linux-android*) - cargo_host="${host/-unknown-/-}" - CARGO_TARGET="$cargo_host" - ;; *) CARGO_TARGET="$host" ;;