From 8a2cab87024c12c4cf564c5379435ec516035f86 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Fri, 21 Jan 2022 16:20:32 +1000 Subject: [PATCH] SHA-512 ASM: For Mac computers default to using SHA512 instructions --- configure.ac | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index b96ee01e8..e9485f952 100644 --- a/configure.ac +++ b/configure.ac @@ -1680,8 +1680,6 @@ then break;; esac ENABLED_ARMASM_SHA512=yes - AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ARMASM_CRYPTO_SHA512" - AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_ARMASM_CRYPTO_SHA512" ;; *) AC_MSG_ERROR([Invalid choice of ARM asm inclusions (yes, sha512-crypto): $ENABLED_ARMASM.]) @@ -1701,6 +1699,8 @@ then *aarch64*) case $host_os in *darwin*) + # All known Aarch64 Mac computers support SHA-512 instructions + ENABLED_ARMASM_SHA512=yes ;; *) # +crypto needed for hardware acceleration @@ -1735,6 +1735,11 @@ then esac fi +if test "$ENABLED_ARMASM_SHA512" = "yes"; then + AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ARMASM_CRYPTO_SHA512" + AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_ARMASM_CRYPTO_SHA512" +fi + # Xilinx hardened crypto AC_ARG_ENABLE([xilinx], [AS_HELP_STRING([--enable-xilinx],[Enable wolfSSL support for Xilinx hardened crypto(default: disabled)])],