diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2021-01-29 18:14:40 +0200 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2021-02-03 18:30:03 +0200 |
commit | af23ab5c5482d625ff52e60606cf044e2b0106c8 (patch) | |
tree | fea1c50aada6c3b56f249cb35171e52981a7fdc4 | |
parent | cb95fc53003e9f34ff80fc33627ceda605de223c (diff) | |
download | libgcrypt-af23ab5c5482d625ff52e60606cf044e2b0106c8.tar.gz |
Fix building with --disable-asm on x86
* cipher/keccak.c (USE_64BIT_BMI2, USE_64BIT_SHLD)
(USE_32BIT_BMI2): Depend also on HAVE_CPU_ARCH_X86.
* random/rndjent.c [__i386__ || __x86_64__] (USE_JENT): Depend
also on HAVE_CPU_ARCH_X86.
--
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
-rw-r--r-- | cipher/keccak.c | 9 | ||||
-rw-r--r-- | random/rndjent.c | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/cipher/keccak.c b/cipher/keccak.c index 87a47ac3..795a02e5 100644 --- a/cipher/keccak.c +++ b/cipher/keccak.c @@ -40,21 +40,24 @@ /* USE_64BIT_BMI2 indicates whether to compile with 64-bit Intel BMI2 code. */ #undef USE_64BIT_BMI2 -#if defined(USE_64BIT) && defined(HAVE_GCC_INLINE_ASM_BMI2) +#if defined(USE_64BIT) && defined(HAVE_GCC_INLINE_ASM_BMI2) && \ + defined(HAVE_CPU_ARCH_X86) # define USE_64BIT_BMI2 1 #endif /* USE_64BIT_SHLD indicates whether to compile with 64-bit Intel SHLD code. */ #undef USE_64BIT_SHLD -#if defined(USE_64BIT) && defined (__GNUC__) && defined(__x86_64__) +#if defined(USE_64BIT) && defined (__GNUC__) && defined(__x86_64__) && \ + defined(HAVE_CPU_ARCH_X86) # define USE_64BIT_SHLD 1 #endif /* USE_32BIT_BMI2 indicates whether to compile with 32-bit Intel BMI2 code. */ #undef USE_32BIT_BMI2 -#if defined(USE_32BIT) && defined(HAVE_GCC_INLINE_ASM_BMI2) +#if defined(USE_32BIT) && defined(HAVE_GCC_INLINE_ASM_BMI2) && \ + defined(HAVE_CPU_ARCH_X86) # define USE_32BIT_BMI2 1 #endif diff --git a/random/rndjent.c b/random/rndjent.c index 3d01290f..56648a87 100644 --- a/random/rndjent.c +++ b/random/rndjent.c @@ -57,7 +57,7 @@ #define JENT_USES_GETTIME 2 #define JENT_USES_READ_REAL_TIME 3 #ifdef ENABLE_JENT_SUPPORT -# if defined (__i386__) || defined(__x86_64__) +# if (defined (__i386__) || defined(__x86_64__)) && defined(HAVE_CPU_ARCH_X86) # define USE_JENT JENT_USES_RDTSC # elif defined (HAVE_CLOCK_GETTIME) # if _AIX |