Skip to content

Commit af057a7

Browse files
committed
Update expected macosx target and fix patch
1 parent dabde2e commit af057a7

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

cpython-unix/patch-apple-cross-3.14.patch

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,30 @@ index 58f54076ff2..a734260691a 100644
4242
*-*-vxworks*)
4343
_host_ident=$host_cpu
4444
;;
45+
@@ -785,6 +809,23 @@ if test "$cross_compiling" = yes; then
46+
_PYTHON_HOST_PLATFORM="$MACHDEP${_host_ident:+-$_host_ident}"
47+
fi
48+
49+
+# The _PYTHON_HOST_PLATFORM environment variable is used to
50+
+# override the platform name in distutils and sysconfig when
51+
+# cross-compiling. On Apple, the platform name expansion logic
52+
+# is non-trivial, including renaming MACHDEP=darwin to macosx
53+
+# and including the deployment target (or current OS version if
54+
+# not set). Here we always force an override based on the target
55+
+# triple. We do this in all build configurations because historically
56+
+# the automatic resolution has been brittle.
57+
+case "$host" in
58+
+aarch64-apple-darwin*)
59+
+ _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-arm64"
60+
+ ;;
61+
+x86_64-apple-darwin*)
62+
+ _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64"
63+
+ ;;
64+
+esac
65+
+
66+
# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
67+
# disable features if it is defined, without any means to access these
68+
# features as extensions. For these systems, we skip the definition of
4569
@@ -1582,7 +1623,7 @@ if test $enable_shared = "yes"; then
4670
BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
4771
RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}

src/validation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ static PLATFORM_TAG_BY_TRIPLE: Lazy<HashMap<&'static str, &'static str>> = Lazy:
489489
("mips64el-unknown-linux-gnuabi64", "todo"),
490490
("ppc64le-unknown-linux-gnu", "linux-powerpc64le"),
491491
("s390x-unknown-linux-gnu", "linux-s390x"),
492-
("x86_64-apple-darwin", "macosx-10.9-x86_64"),
492+
("x86_64-apple-darwin", "macosx-10.15-x86_64"),
493493
("x86_64-apple-ios", "iOS-x86_64"),
494494
("x86_64-pc-windows-msvc", "win-amd64"),
495495
("x86_64-unknown-linux-gnu", "linux-x86_64"),

0 commit comments

Comments
 (0)