From: Mika Lindqvist Date: Sat, 9 Jul 2022 09:33:02 +0000 (+0300) Subject: Treat arm64 as aarch64 for Apple M1. X-Git-Tag: 2.1.0-beta1~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b18c815056e9b20175d44732bd7416f1fe6a931e;p=thirdparty%2Fzlib-ng.git Treat arm64 as aarch64 for Apple M1. --- diff --git a/cmake/detect-arch.c b/cmake/detect-arch.c index 84e6a8410..43ddb126a 100644 --- a/cmake/detect-arch.c +++ b/cmake/detect-arch.c @@ -12,7 +12,7 @@ #error archfound i686 // ARM -#elif defined(__aarch64__) || defined(_M_ARM64) +#elif defined(__aarch64__) || defined(__arm64__) || defined(_M_ARM64) #error archfound aarch64 #elif defined(__arm__) || defined(__arm) || defined(_M_ARM) || defined(__TARGET_ARCH_ARM) #if defined(__ARM64_ARCH_8__) || defined(__ARMv8__) || defined(__ARMv8_A__) diff --git a/configure b/configure index ffee40054..f28f1dba2 100755 --- a/configure +++ b/configure @@ -359,7 +359,7 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then else ARCH=native fi ;; - aarch64 | aarch64_be) + aarch64 | aarch64_be | arm64) if test "${uname}" = "elf"; then uname=aarch64 fi @@ -1125,7 +1125,7 @@ EOF check_neon_ld4_intrinsics() { if test $buildneon -eq 1 && test $native -eq 0; then - if test "$CC_ARCH" = "aarch64" || test "$CC_ARCH" = "aarch64_be"; then + if test "$CC_ARCH" = "aarch64" || test "$CC_ARCH" = "aarch64_be" || test "$CC_ARCH" = "arm64"; then neonflag="-march=armv8-a+simd" elif test $MFPU_NEON_AVAILABLE -eq 1; then neonflag="-mfpu=neon"