aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2020-11-08 10:05:27 +0100
committerGitHub <noreply@github.com>2020-11-08 10:05:27 +0100
commit41761933c1c30bb6003b65eef1ba23a83db4eae4 (patch)
tree0a8fa35d890b61bc2c688bb966773f7aa026f3b1 /configure.ac
parentMinor wording change in concurrent.futures. (GH-23194) (diff)
downloadcpython-41761933c1c30bb6003b65eef1ba23a83db4eae4.tar.gz
cpython-41761933c1c30bb6003b65eef1ba23a83db4eae4.tar.bz2
cpython-41761933c1c30bb6003b65eef1ba23a83db4eae4.zip
bpo-41100: Support macOS 11 and Apple Silicon (GH-22855)
Co-authored-by: Lawrence D’Anna <lawrence_danna@apple.com> * Add support for macOS 11 and Apple Silicon (aka arm64) As a side effect of this work use the system copy of libffi on macOS, and remove the vendored copy * Support building on recent versions of macOS while deploying to older versions This allows building installers on macOS 11 while still supporting macOS 10.9.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 19 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 49ed09a3a00..1edafc342b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -218,7 +218,7 @@ AC_ARG_WITH(universal-archs,
AS_HELP_STRING([--with-universal-archs=ARCH],
[specify the kind of universal binary that should be created. this option is
only valid when --enable-universalsdk is set; options are:
- ("32-bit", "64-bit", "3-way", "intel", "intel-32", "intel-64", or "all")
+ ("universal2", "32-bit", "64-bit", "3-way", "intel", "intel-32", "intel-64", or "all")
see Mac/README.rst]),
[
UNIVERSAL_ARCHS="$withval"
@@ -1597,7 +1597,7 @@ AC_SUBST(BASECFLAGS)
AC_SUBST(CFLAGS_NODIST)
AC_SUBST(LDFLAGS_NODIST)
-# The -arch flags for universal builds on OSX
+# The -arch flags for universal builds on macOS
UNIVERSAL_ARCH_FLAGS=
AC_SUBST(UNIVERSAL_ARCH_FLAGS)
@@ -1898,6 +1898,11 @@ yes)
LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
;;
+ universal2)
+ UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
+ LIPO_32BIT_FLAGS=""
+ ARCH_RUN_32BIT="true"
+ ;;
intel)
UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
LIPO_32BIT_FLAGS="-extract i386"
@@ -1919,7 +1924,7 @@ yes)
ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
;;
*)
- AC_MSG_ERROR([proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way])
+ AC_MSG_ERROR([proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way])
;;
esac
@@ -2489,7 +2494,7 @@ case $ac_sys_system/$ac_sys_release in
MACOSX_DEFAULT_ARCH="ppc"
;;
*)
- AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
+ AC_MSG_ERROR([Unexpected output of 'arch' on macOS])
;;
esac
else
@@ -2499,9 +2504,12 @@ case $ac_sys_system/$ac_sys_release in
;;
ppc)
MACOSX_DEFAULT_ARCH="ppc64"
+ ;;
+ arm64)
+ MACOSX_DEFAULT_ARCH="arm64"
;;
*)
- AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
+ AC_MSG_ERROR([Unexpected output of 'arch' on macOS])
;;
esac
@@ -3774,6 +3782,12 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
])
+AC_MSG_CHECKING(for _dyld_shared_cache_contains_path)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mach-o/dyld.h>]], [[void *x=_dyld_shared_cache_contains_path]])],
+ [AC_DEFINE(HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH, 1, Define if you have the '_dyld_shared_cache_contains_path' function.)
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)
+])
AC_MSG_CHECKING(for memfd_create)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[