Browse Source
bpo-41100: Support macOS 11 and Apple Silicon (GH-22855)
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.pull/23201/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 1587 additions and 345 deletions
-
44Lib/_osx_support.py
-
12Lib/ctypes/macholib/dyld.py
-
15Lib/ctypes/test/test_macholib.py
-
2Lib/distutils/tests/test_build_ext.py
-
1Lib/test/test_bytes.py
-
2Lib/test/test_platform.py
-
228Lib/test/test_posix.py
-
30Lib/test/test_time.py
-
2Lib/test/test_unicode.py
-
30Mac/BuildScript/build-installer.py
-
41Mac/BuildScript/openssl-mac-arm64.patch
-
37Mac/README.rst
-
12Mac/Tools/pythonw.c
-
8Misc/NEWS.d/next/macOS/2020-11-01-16-40-23.bpo-41100.BApztP.rst
-
39Modules/_ctypes/callbacks.c
-
127Modules/_ctypes/callproc.c
-
8Modules/_ctypes/ctypes.h
-
15Modules/_ctypes/malloc_closure.c
-
4Modules/getpath.c
-
822Modules/posixmodule.c
-
214Modules/timemodule.c
-
42Python/bootstrap_hash.c
-
31Python/pytime.c
-
45configure
-
24configure.ac
-
3pyconfig.h.in
-
94setup.py
@ -0,0 +1,41 @@ |
|||
diff -ur openssl-1.1.1g-orig/Configurations/10-main.conf openssl-1.1.1g/Configurations/10-main.conf
|
|||
--- openssl-1.1.1g-orig/Configurations/10-main.conf 2020-04-21 14:22:39.000000000 +0200
|
|||
+++ openssl-1.1.1g/Configurations/10-main.conf 2020-07-26 12:21:32.000000000 +0200
|
|||
@@ -1557,6 +1557,14 @@
|
|||
bn_ops => "SIXTY_FOUR_BIT_LONG", |
|||
perlasm_scheme => "macosx", |
|||
}, |
|||
+ "darwin64-arm64-cc" => {
|
|||
+ inherit_from => [ "darwin-common", asm("aarch64_asm") ],
|
|||
+ CFLAGS => add("-Wall"),
|
|||
+ cflags => add("-arch arm64"),
|
|||
+ lib_cppflags => add("-DL_ENDIAN"),
|
|||
+ bn_ops => "SIXTY_FOUR_BIT_LONG",
|
|||
+ perlasm_scheme => "ios64",
|
|||
+ },
|
|||
|
|||
##### GNU Hurd |
|||
"hurd-x86" => { |
|||
diff -ur openssl-1.1.1g-orig/config openssl-1.1.1g/config
|
|||
--- openssl-1.1.1g-orig/config 2020-04-21 14:22:39.000000000 +0200
|
|||
+++ openssl-1.1.1g/config 2020-07-26 12:21:59.000000000 +0200
|
|||
@@ -255,6 +255,9 @@
|
|||
;; |
|||
x86_64) |
|||
echo "x86_64-apple-darwin${VERSION}" |
|||
+ ;;
|
|||
+ arm64)
|
|||
+ echo "arm64-apple-darwin${VERSION}"
|
|||
;; |
|||
*) |
|||
echo "i686-apple-darwin${VERSION}" |
|||
@@ -497,6 +500,9 @@
|
|||
else |
|||
OUT="darwin64-x86_64-cc" |
|||
fi ;; |
|||
+ x86_64-apple-darwin*)
|
|||
+ OUT="darwin64-arm64-cc"
|
|||
+ ;;
|
|||
armv6+7-*-iphoneos) |
|||
__CNF_CFLAGS="$__CNF_CFLAGS -arch armv6 -arch armv7" |
|||
__CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch armv6 -arch armv7" |
|||
@ -0,0 +1,8 @@ |
|||
Add support for macOS 11 and Apple Silicon systems. |
|||
|
|||
It is now possible to build "Universal 2" binaries using |
|||
"--enable-universalsdk --with-universal-archs=universal2". |
|||
|
|||
Binaries build on later macOS versions can be deployed back to older |
|||
versions (tested up to macOS 10.9), when using the correct deployment |
|||
target. This is tested using Xcode 11 and later. |
|||
822
Modules/posixmodule.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue