Disable Cryptogams AES under Clang

What a surprise... Clang pretends to be GCC with __GNUC__ but fails to consume the source file
pull/687/head
Jeffrey Walton 2018-07-11 09:19:11 -04:00
parent 3ff7d7f028
commit 1e77a72ed6
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 3 additions and 2 deletions

View File

@ -655,8 +655,9 @@ NAMESPACE_END
// not provide an ARM implementation. The Cryptogams implementation
// is about 2x faster than C/C++. Define this to use the Cryptogams
// AES implementation on GNU Linux systems. When defined, Crypto++
// will use aes-armv4.S.
#if !defined(CRYPTOPP_DISABLE_ASM) && defined(__GNUC__) && defined(__arm__)
// will use aes-armv4.S. LLVM miscomiles aes-armv4.S so disable
// under Clang. See https://bugs.llvm.org/show_bug.cgi?id=38133.
#if !defined(CRYPTOPP_DISABLE_ASM) && defined(__arm__) && defined(__GNUC__) && !defined(__clang__)
# define CRYPTOGAMS_ARM_AES 1
#endif