diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-06-26 16:53:12 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-06-27 00:55:22 +0200 |
commit | 3d8260d3d3243ff5747b846cde296642156f51b0 (patch) | |
tree | c12fe1bfa0c8619a3dbdafbc3fd1d7411b30c0ae /src/Crypto/Sha2.c | |
parent | e8bafa6a378852977326c060c505b6487232664b (diff) | |
download | VeraCrypt-3d8260d3d3243ff5747b846cde296642156f51b0.tar.gz VeraCrypt-3d8260d3d3243ff5747b846cde296642156f51b0.zip |
MacOSX: various changes for assembly files build. Don't use 32-bit assembly code of SHA-512 since it is not compatible with PIE configuration of OSX compiler (absolute addressing used)
Diffstat (limited to 'src/Crypto/Sha2.c')
-rw-r--r-- | src/Crypto/Sha2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Crypto/Sha2.c b/src/Crypto/Sha2.c index d383a3e9..fc1d0aec 100644 --- a/src/Crypto/Sha2.c +++ b/src/Crypto/Sha2.c @@ -26,7 +26,7 @@ extern "C" void sha512_avx(const void* M, void* D, uint_64t l); #endif -#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64 +#if CRYPTOPP_BOOL_X64 || ((CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32) && !defined (TC_MACOSX)) void sha512_compress_nayuki(uint_64t state[8], const uint_8t block[128]); #endif #if defined(__cplusplus) @@ -173,7 +173,7 @@ void SSE4Transform(sha512_ctx* ctx, void* mp, uint_64t num_blks) } #endif -#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64 +#if CRYPTOPP_BOOL_X64 || ((CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32) && !defined (TC_MACOSX)) void SSE2Transform(sha512_ctx* ctx, void* mp, uint_64t num_blks) { @@ -216,7 +216,7 @@ void sha512_begin(sha512_ctx* ctx) else #endif -#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64 +#if CRYPTOPP_BOOL_X64 || ((CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32) && !defined (TC_MACOSX)) if (HasSSE2() && HasMMX()) transfunc = SSE2Transform; else |