]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-90905: Allow cross-compilation on macOS (#128385)
authorZanie Blue <contact@zanie.dev>
Mon, 13 Jan 2025 08:38:28 +0000 (02:38 -0600)
committerGitHub <noreply@github.com>
Mon, 13 Jan 2025 08:38:28 +0000 (03:38 -0500)
Misc/NEWS.d/next/Build/2024-12-31-17-09-37.gh-issue-90905.PjLNai.rst [new file with mode: 0644]
configure
configure.ac

diff --git a/Misc/NEWS.d/next/Build/2024-12-31-17-09-37.gh-issue-90905.PjLNai.rst b/Misc/NEWS.d/next/Build/2024-12-31-17-09-37.gh-issue-90905.PjLNai.rst
new file mode 100644 (file)
index 0000000..31bb5fe
--- /dev/null
@@ -0,0 +1 @@
+Add support for cross-compiling to x86_64 on aarch64/arm64 macOS.
index bb77c558abda5a7ad235906a2465785c5f235d74..70581e11b6068296bc78c169e58af40eda2fa9c1 100755 (executable)
--- a/configure
+++ b/configure
@@ -4097,6 +4097,9 @@ then
        *-apple-ios*)
                ac_sys_system=iOS
                ;;
+       *-*-darwin*)
+               ac_sys_system=Darwin
+               ;;
        *-*-vxworks*)
            ac_sys_system=VxWorks
            ;;
@@ -4591,6 +4594,15 @@ printf "%s\n" "$IPHONEOS_DEPLOYMENT_TARGET" >&6; }
                                ;;
                esac
                ;;
+       *-*-darwin*)
+               case "$host_cpu" in
+               arm*)
+                       _host_ident=arm
+                       ;;
+               *)
+                       _host_ident=$host_cpu
+               esac
+               ;;
        *-*-vxworks*)
                _host_ident=$host_cpu
                ;;
index 653cd3f6c531b69f22f099bdbb66615a03907ae2..d7c3920d049d674134b8ae73b0cf117315a167f3 100644 (file)
@@ -330,6 +330,9 @@ then
        *-apple-ios*)
                ac_sys_system=iOS
                ;;
+       *-*-darwin*)
+               ac_sys_system=Darwin
+               ;;
        *-*-vxworks*)
            ac_sys_system=VxWorks
            ;;
@@ -790,6 +793,15 @@ if test "$cross_compiling" = yes; then
                                ;;
                esac
                ;;
+       *-*-darwin*)
+               case "$host_cpu" in
+               arm*)
+                       _host_ident=arm
+                       ;;
+               *)
+                       _host_ident=$host_cpu
+               esac
+               ;;
        *-*-vxworks*)
                _host_ident=$host_cpu
                ;;