diff --git a/src/libsodium/Makefile.am b/src/libsodium/Makefile.am index d65af0e3..4c2b506c 100644 --- a/src/libsodium/Makefile.am +++ b/src/libsodium/Makefile.am @@ -214,7 +214,7 @@ endif libaesni_la_LDFLAGS = $(libsodium_la_LDFLAGS) libaesni_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \ - @CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_AESNI@ @CFLAGS_PCLMUL@ + @CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_AVX@ @CFLAGS_AESNI@ @CFLAGS_PCLMUL@ libaesni_la_SOURCES = \ crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c diff --git a/src/libsodium/Makefile.in b/src/libsodium/Makefile.in index f28959f6..5bbf847f 100644 --- a/src/libsodium/Makefile.in +++ b/src/libsodium/Makefile.in @@ -1035,7 +1035,7 @@ librdrand_la_SOURCES = \ libaesni_la_LDFLAGS = $(libsodium_la_LDFLAGS) libaesni_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \ - @CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_AESNI@ @CFLAGS_PCLMUL@ + @CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_AVX@ @CFLAGS_AESNI@ @CFLAGS_PCLMUL@ libaesni_la_SOURCES = \ crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c diff --git a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c index 7faf0be0..034fdf90 100644 --- a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +++ b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c @@ -17,9 +17,7 @@ #if defined(HAVE_TMMINTRIN_H) && defined(HAVE_WMMINTRIN_H) #ifdef __GNUC__ -#pragma GCC target("ssse3") -#pragma GCC target("aes") -#pragma GCC target("pclmul") +#pragma GCC target("aes,pclmul,avx") #endif #if !defined(_MSC_VER) || _MSC_VER < 1800 @@ -996,7 +994,7 @@ crypto_aead_aes256gcm_decrypt(unsigned char *m, unsigned long long *mlen_p, unsi int crypto_aead_aes256gcm_is_available(void) { - return sodium_runtime_has_pclmul() & sodium_runtime_has_aesni(); + return sodium_runtime_has_pclmul() & sodium_runtime_has_aesni() & sodium_runtime_has_avx(); } #else