From 5b945a54126b7aea283971a1de0df3f685fd01dd Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 11 Aug 2017 14:24:05 -0400 Subject: [PATCH] Update for earlier Apple compilers, like Apple Clang 6 and 8 --- config.h | 3 --- crc-simd.cpp | 3 +++ gcm-simd.cpp | 3 +++ rijndael-simd.cpp | 3 +++ sha-simd.cpp | 3 +++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/config.h b/config.h index b5a6cfa7..96de92c6 100644 --- a/config.h +++ b/config.h @@ -574,9 +574,6 @@ NAMESPACE_END # define CRYPTOPP_ARM_AES_AVAILABLE 1 # define CRYPTOPP_ARM_SHA_AVAILABLE 1 # define CRYPTOPP_ARM_CRYPTO_AVAILABLE 1 -# if !defined(__apple_build_version__) -# define CRYPTOPP_ARM_PMULL_AVAILABLE 1 -# endif # endif #endif diff --git a/crc-simd.cpp b/crc-simd.cpp index e1ed3ff0..439fd66c 100644 --- a/crc-simd.cpp +++ b/crc-simd.cpp @@ -29,6 +29,9 @@ # include "nmmintrin.h" #endif +// Don't include when using Apple Clang. Early Apple compilers +// fail to compile with included. Later Apple compilers compile +// intrinsics without included. #if (CRYPTOPP_ARM_CRC32_AVAILABLE) && !defined(CRYPTOPP_APPLE_CLANG_VERSION) # include "arm_acle.h" #endif diff --git a/gcm-simd.cpp b/gcm-simd.cpp index bc230692..1033bb34 100644 --- a/gcm-simd.cpp +++ b/gcm-simd.cpp @@ -34,6 +34,9 @@ # include "arm_neon.h" #endif +// Don't include when using Apple Clang. Early Apple compilers +// fail to compile with included. Later Apple compilers compile +// intrinsics without included. #if (CRYPTOPP_ARM_PMULL_AVAILABLE) && !defined(CRYPTOPP_APPLE_CLANG_VERSION) # include "arm_acle.h" #endif diff --git a/rijndael-simd.cpp b/rijndael-simd.cpp index 4f608ae7..58842576 100644 --- a/rijndael-simd.cpp +++ b/rijndael-simd.cpp @@ -46,6 +46,9 @@ # include "arm_neon.h" #endif +// Don't include when using Apple Clang. Early Apple compilers +// fail to compile with included. Later Apple compilers compile +// intrinsics without included. #if (CRYPTOPP_ARM_AES_AVAILABLE) && !defined(CRYPTOPP_APPLE_CLANG_VERSION) # include "arm_acle.h" #endif diff --git a/sha-simd.cpp b/sha-simd.cpp index bb65a15b..ce319893 100644 --- a/sha-simd.cpp +++ b/sha-simd.cpp @@ -43,6 +43,9 @@ # include "arm_neon.h" #endif +// Don't include when using Apple Clang. Early Apple compilers +// fail to compile with included. Later Apple compilers compile +// intrinsics without included. #if (CRYPTOPP_ARM_AES_AVAILABLE) && !defined(CRYPTOPP_APPLE_CLANG_VERSION) # include "arm_acle.h" #endif