From b18c815056e9b20175d44732bd7416f1fe6a931e Mon Sep 17 00:00:00 2001 From: Mika Lindqvist Date: Sat, 9 Jul 2022 12:33:02 +0300 Subject: [PATCH] Treat arm64 as aarch64 for Apple M1. --- cmake/detect-arch.c | 2 +- configure | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/detect-arch.c b/cmake/detect-arch.c index 84e6a841..43ddb126 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 ffee4005..f28f1dba 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" -- 2.47.3