diff options
author | Xeonacid <h.dwwwwww@gmail.com> | 2025-01-30 16:53:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-30 09:53:19 +0100 |
commit | c71fa14dc09fd7f31282f6ce4fdf3db547b9b827 (patch) | |
tree | fa46ae370bcb23dc97cb1aa2805a92728f26ddae | |
parent | 5ceec41eb398edf49a5d2c598b43944f0665e0d6 (diff) | |
download | VeraCrypt-c71fa14dc09fd7f31282f6ce4fdf3db547b9b827.tar.gz VeraCrypt-c71fa14dc09fd7f31282f6ce4fdf3db547b9b827.zip |
This helps building on riscv which does not have immintrin.h.
-rw-r--r-- | src/Crypto/config.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/Crypto/config.h b/src/Crypto/config.h index f485c07e..841d6ead 100644 --- a/src/Crypto/config.h +++ b/src/Crypto/config.h @@ -156,17 +156,8 @@ #else #define CRYPTOPP_BOOL_SSE41_INTRINSICS_AVAILABLE 0 #endif -#if !defined(CRYPTOPP_DISABLE_SHANI) && !defined(_M_ARM) && !defined(_M_ARM64) && !defined(__arm__) && !defined(__aarch64__) && !defined(__arm64__) && defined(CRYPTOPP_BOOL_SSE41_INTRINSICS_AVAILABLE) && \ - (defined(__SHA__) || (_MSC_VER >= 1900) || (__SUNPRO_CC >= 0x5160) || \ - (CRYPTOPP_GCC_VERSION >= 40900) || (__INTEL_COMPILER >= 1600) || \ - (CRYPTOPP_LLVM_CLANG_VERSION >= 30400) || (CRYPTOPP_APPLE_CLANG_VERSION >= 50100)) - #define CRYPTOPP_SHANI_AVAILABLE 1 -#else - #define CRYPTOPP_SHANI_AVAILABLE 0 -#endif - // how to allocate 16-byte aligned memory (for SSE2) #if defined(_MSC_VER) #define CRYPTOPP_MM_MALLOC_AVAILABLE #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) @@ -205,8 +196,19 @@ #else #define CRYPTOPP_BOOL_X64 0 #endif +#if !defined(CRYPTOPP_DISABLE_SHANI) && \ + (CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X64) && \ + defined(CRYPTOPP_BOOL_SSE41_INTRINSICS_AVAILABLE) && \ + (defined(__SHA__) || (_MSC_VER >= 1900) || (__SUNPRO_CC >= 0x5160) || \ + (CRYPTOPP_GCC_VERSION >= 40900) || (__INTEL_COMPILER >= 1600) || \ + (CRYPTOPP_LLVM_CLANG_VERSION >= 30400) || (CRYPTOPP_APPLE_CLANG_VERSION >= 50100)) + #define CRYPTOPP_SHANI_AVAILABLE 1 +#else + #define CRYPTOPP_SHANI_AVAILABLE 0 +#endif + #if defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64) #define CRYPTOPP_BOOL_ARMV8 1 #define CRYPTOPP_BOOL_ARM64 1 #else |