diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2021-03-06 16:57:39 +0200 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2021-03-07 18:46:22 +0200 |
commit | 43302b960f546fd60ed7fefb2b0404ee69491e93 (patch) | |
tree | 76db85fb8a0ca87c0daf4ad34422bb69cc8c2bed | |
parent | 8892510bb8f45438144a7449440fcb32ae4c5f7b (diff) | |
download | libgcrypt-43302b960f546fd60ed7fefb2b0404ee69491e93.tar.gz |
Compile arch specific GCM implementations only on target arch
* cipher/Makefile.am: Move arch specific 'cipher-gcm-*.[cS]' files
from libcipher_la_SOURCES to EXTRA_libcipher_la_SOURCES.
* configure.ac: Add 'cipher-gcm-intel-pclmul.lo' and
'cipher-gcm-arm*.lo'.
--
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
-rw-r--r-- | cipher/Makefile.am | 6 | ||||
-rw-r--r-- | configure.ac | 16 |
2 files changed, 13 insertions, 9 deletions
diff --git a/cipher/Makefile.am b/cipher/Makefile.am index da8cc126..52a00aa9 100644 --- a/cipher/Makefile.am +++ b/cipher/Makefile.am @@ -48,8 +48,7 @@ libcipher_la_SOURCES = \ cipher-aeswrap.c \ cipher-ccm.c \ cipher-cmac.c \ - cipher-gcm.c cipher-gcm-intel-pclmul.c cipher-gcm-armv7-neon.S \ - cipher-gcm-armv8-aarch32-ce.S cipher-gcm-armv8-aarch64-ce.S \ + cipher-gcm.c \ cipher-poly1305.c \ cipher-ocb.c \ cipher-xts.c \ @@ -83,7 +82,8 @@ EXTRA_libcipher_la_SOURCES = \ chacha20.c chacha20-amd64-ssse3.S chacha20-amd64-avx2.S \ chacha20-armv7-neon.S chacha20-aarch64.S \ chacha20-ppc.c chacha20-s390x.S \ - cipher-gcm-ppc.c \ + cipher-gcm-ppc.c cipher-gcm-intel-pclmul.c cipher-gcm-armv7-neon.S \ + cipher-gcm-armv8-aarch32-ce.S cipher-gcm-armv8-aarch64-ce.S \ crc.c crc-intel-pclmul.c crc-armv8-ce.c \ crc-armv8-aarch64-ce.S \ crc-ppc.c \ diff --git a/configure.ac b/configure.ac index 3734cf7a..44ffffa7 100644 --- a/configure.ac +++ b/configure.ac @@ -3060,14 +3060,18 @@ esac # Arch specific GCM implementations case "${host}" in - powerpc64le-*-*) - GCRYPT_DIGESTS="$GCRYPT_DIGESTS cipher-gcm-ppc.lo" + i?86-*-* | x86_64-*-*) + GCRYPT_DIGESTS="$GCRYPT_DIGESTS cipher-gcm-intel-pclmul.lo" ;; - powerpc64-*-*) - GCRYPT_DIGESTS="$GCRYPT_DIGESTS cipher-gcm-ppc.lo" + arm*-*-*) + GCRYPT_DIGESTS="$GCRYPT_DIGESTS cipher-gcm-armv7-neon.lo" + GCRYPT_DIGESTS="$GCRYPT_DIGESTS cipher-gcm-armv8-aarch32-ce.lo" + ;; + aarch64-*-*) + GCRYPT_DIGESTS="$GCRYPT_DIGESTS cipher-gcm-armv8-aarch64-ce.lo" ;; - powerpc-*-*) - GCRYPT_DIGESTS="$GCRYPT_DIGESTS cipher-gcm-ppc.lo" + powerpc64le-*-* | powerpc64-*-* | powerpc-*-*) + GCRYPT_DIGESTS="$GCRYPT_DIGESTS cipher-gcm-ppc.lo" ;; esac |