diff --git a/config.h b/config.h index e4bcf946..0af378a8 100644 --- a/config.h +++ b/config.h @@ -585,6 +585,12 @@ NAMESPACE_END # endif #endif +// Fixup for SunCC 12.2-12.6. Compiler crash on GCM_Reduce_CLMUL and friends. +// http://github.com/weidai11/cryptopp/issues/226 +#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x5150) +# undef CRYPTOPP_CLMUL_AVAILABLE +#endif + #endif // X86, X32, X64 // ***************** ARM CPU features ******************** diff --git a/gcm-simd.cpp b/gcm-simd.cpp index f7fd4701..f8e39a53 100644 --- a/gcm-simd.cpp +++ b/gcm-simd.cpp @@ -10,9 +10,10 @@ #include "config.h" #include "misc.h" -// Clang 3.3 integrated assembler crash on Linux. Other versions produce incorrect results. -// Clang has never handled Intel ASM very well. I wish LLVM would fix it. -#if defined(__clang__) +// Clang 3.3 integrated assembler crash on Linux. Other versions +// produce incorrect results. Clang has never handled Intel ASM +// very well. I wish LLVM would fix it. +#if defined(CRYPTOPP_DISABLE_INTEL_ASM) # undef CRYPTOPP_X86_ASM_AVAILABLE # undef CRYPTOPP_X32_ASM_AVAILABLE # undef CRYPTOPP_X64_ASM_AVAILABLE