|
1 | 1 | diff --git a/configure.ac b/configure.ac
|
2 |
| -index c62a565eb6..f39de9f98c 100644 |
| 2 | +index c62a565eb6..7e5d34632c 100644 |
3 | 3 | --- a/configure.ac
|
4 | 4 | +++ b/configure.ac
|
5 | 5 | @@ -545,6 +545,15 @@ then
|
@@ -38,32 +38,30 @@ index c62a565eb6..f39de9f98c 100644
|
38 | 38 | *-*-vxworks*)
|
39 | 39 | _host_cpu=$host_cpu
|
40 | 40 | ;;
|
41 |
| -@@ -611,7 +633,24 @@ if test "$cross_compiling" = yes; then |
42 |
| - MACHDEP="unknown" |
43 |
| - AC_MSG_ERROR([cross build not supported for $host]) |
44 |
| - esac |
45 |
| -- _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}" |
46 |
| -+ |
47 |
| -+ case "$host" in |
48 |
| -+ # The _PYTHON_HOST_PLATFORM environment variable is used to |
49 |
| -+ # override the platform name in distutils and sysconfig when |
50 |
| -+ # cross-compiling. On Apple, the platform name expansion logic |
51 |
| -+ # is non-trivial, including renaming MACHDEP=darwin to macosx |
52 |
| -+ # and including the deployment target (or current OS version if |
53 |
| -+ # not set). Our hack here is not generic, but gets the job done |
54 |
| -+ # for python-build-standalone's cross-compile use cases. |
55 |
| -+ aarch64-apple-darwin*) |
56 |
| -+ _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-arm64" |
57 |
| -+ ;; |
58 |
| -+ x86_64-apple-darwin*) |
59 |
| -+ _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64" |
60 |
| -+ ;; |
61 |
| -+ *) |
62 |
| -+ _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}" |
63 |
| -+ esac |
| 41 | +@@ -614,6 +636,23 @@ if test "$cross_compiling" = yes; then |
| 42 | + _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}" |
64 | 43 | fi
|
65 | 44 |
|
| 45 | ++# The _PYTHON_HOST_PLATFORM environment variable is used to |
| 46 | ++# override the platform name in distutils and sysconfig when |
| 47 | ++# cross-compiling. On Apple, the platform name expansion logic |
| 48 | ++# is non-trivial, including renaming MACHDEP=darwin to macosx |
| 49 | ++# and including the deployment target (or current OS version if |
| 50 | ++# not set). Here we always force an override based on the target |
| 51 | ++# triple. We do this in all build configurations because historically |
| 52 | ++# the automatic resolution has been brittle. |
| 53 | ++case "$host" in |
| 54 | ++aarch64-apple-darwin*) |
| 55 | ++ _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-arm64" |
| 56 | ++ ;; |
| 57 | ++x86_64-apple-darwin*) |
| 58 | ++ _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64" |
| 59 | ++ ;; |
| 60 | ++esac |
| 61 | ++ |
66 | 62 | # Some systems cannot stand _XOPEN_SOURCE being defined at all; they
|
| 63 | + # disable features if it is defined, without any means to access these |
| 64 | + # features as extensions. For these systems, we skip the definition of |
67 | 65 | @@ -1507,7 +1546,7 @@ if test $enable_shared = "yes"; then
|
68 | 66 | BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
|
69 | 67 | RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
|
|
0 commit comments