summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStuart Carnie <stuart.carnie@gmail.com>2020-07-04 11:41:43 -0700
committerRichard Levitte <levitte@openssl.org>2020-12-03 11:17:16 +0100
commit61168b5b8dde03f3b77ddf5e4b1b81c338c01746 (patch)
tree0448de3823313f2c7cadcaad0363b32e52c5ff58
parent9d5580612887b0c37016e7b65707e8e9dc27f4bb (diff)
Configuration: darwin64-arm64-cc for Apple silicon
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12369)
-rw-r--r--CHANGES3
-rw-r--r--Configurations/10-main.conf8
-rwxr-xr-xconfig8
3 files changed, 15 insertions, 4 deletions
diff --git a/CHANGES b/CHANGES
index 401ae7a339..b927cf1361 100644
--- a/CHANGES
+++ b/CHANGES
@@ -46,6 +46,9 @@
*) The Oracle Developer Studio compiler will start reporting deprecated APIs
+ *) Add support for Apple Silicon M1 Macs with the darwin64-arm64-cc target.
+ [Stuart Carnie]
+
Changes between 1.1.1f and 1.1.1g [21 Apr 2020]
*) Fixed segmentation fault in SSL_check_chain()
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index eb92c24f48..cea4feb9a0 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1557,6 +1557,14 @@ my %targets = (
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 --git a/config b/config
index f28828d482..26225ca2a9 100755
--- a/config
+++ b/config
@@ -253,11 +253,8 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
Power*)
echo "ppc-apple-darwin${VERSION}"
;;
- x86_64)
- echo "x86_64-apple-darwin${VERSION}"
- ;;
*)
- echo "i686-apple-darwin${VERSION}"
+ echo "${MACHINE}-apple-darwin${VERSION}"
;;
esac
exit 0
@@ -497,6 +494,9 @@ case "$GUESSOS" in
else
OUT="darwin64-x86_64-cc"
fi ;;
+ $MACHINE-apple-darwin*)
+ OUT="darwin64-$MACHINE-cc"
+ ;;
armv6+7-*-iphoneos)
__CNF_CFLAGS="$__CNF_CFLAGS -arch armv6 -arch armv7"
__CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch armv6 -arch armv7"