Mailing List Archive

[PATCH 2/8] 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>
---
cipher/keccak.c | 9 ++++++---
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
--
2.27.0


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel