From d37afa9ab0146e4d2d6a1b1af51632b6129a8966 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 6 May 2016 06:56:08 -0400 Subject: [PATCH] Improve include logic for under GCC --- cpu.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cpu.h b/cpu.h index 90a499d0..56baf5ae 100644 --- a/cpu.h +++ b/cpu.h @@ -20,7 +20,7 @@ # if CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE # include # endif -# if (__ARM_ACLE >= 200) +# if defined(__ARM_FEATURE_CRC32) || (__ARM_ACLE >= 200) # include # endif #endif // ARM-32 or ARM-64 @@ -242,6 +242,7 @@ void CRYPTOPP_API DetectArmFeatures(); //! \brief Determine if an ARM processor has Advanced SIMD available //! \returns true if the hardware is capable of Advanced SIMD at runtime, false otherwise. +//! \details Runtime support requires compile time support. inline bool HasNEON() { if (!g_ArmDetectionDone) @@ -251,6 +252,8 @@ inline bool HasNEON() //! \brief Determine if an ARM processor has CRC32 available //! \returns true if the hardware is capable of CRC32 at runtime, false otherwise. +//! \details Runtime support requires compile time support. When compiling with GCC, you may +//! need to compile with -march=armv8-a+crc. inline bool HasCRC32() { if (!g_ArmDetectionDone)