diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2016-05-09 04:04:59 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2016-06-08 18:18:13 +0200 |
commit | dc76313308c184c92eb78452b503405b90fc7ebd (patch) | |
tree | eabe923b5b49971ffd0c08cf49e9cb4ff5d6d911 /cipher/crc-intel-pclmul.c | |
parent | bd39eb9fba47dc8500c83769a679cc8b683d6c6e (diff) | |
download | libgcrypt-dc76313308c184c92eb78452b503405b90fc7ebd.tar.gz |
Check for compiler SSE4.1 support in PCLMUL CRC code.
* cipher/crc-intel-pclmul.c: Build PCLMUL CRC implementation only if
compiler supports PCLMUL *and* SSE4.1
* cipher/crc.c: Ditto
* configure.ac (sse41support, gcry_cv_gcc_inline_asm_sse41): New.
--
Fixes build with the native gcc on OpenBSD/amd64, which supports PCLMUL
but not SSE4.1.
Signed-off-by: Jérémie Courrèges-Anglas <jca@wxcvbn.org>
Diffstat (limited to 'cipher/crc-intel-pclmul.c')
-rw-r--r-- | cipher/crc-intel-pclmul.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cipher/crc-intel-pclmul.c b/cipher/crc-intel-pclmul.c index c034e2eb..2972fb4d 100644 --- a/cipher/crc-intel-pclmul.c +++ b/cipher/crc-intel-pclmul.c @@ -30,7 +30,8 @@ #include "bufhelp.h" -#if defined(ENABLE_PCLMUL_SUPPORT) && __GNUC__ >= 4 && \ +#if defined(ENABLE_PCLMUL_SUPPORT) && defined(ENABLE_SSE41_SUPPORT) && \ + __GNUC__ >= 4 && \ ((defined(__i386__) && SIZEOF_UNSIGNED_LONG == 4) || defined(__x86_64__)) |