diff --git a/CMakeLists.txt b/CMakeLists.txt index f55765c9..75a75f57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,6 +110,11 @@ if (${ARCH} STREQUAL "x86" AND APPLE) set(ARCH "x86_64") endif() +if (OPENSSL_NO_ASM) + add_definitions(-DOPENSSL_NO_ASM) + set(ARCH "generic") +endif() + add_subdirectory(crypto) add_subdirectory(ssl) add_subdirectory(ssl/test) diff --git a/crypto/rand/hwrand.c b/crypto/rand/hwrand.c index c5bace82..73d3de76 100644 --- a/crypto/rand/hwrand.c +++ b/crypto/rand/hwrand.c @@ -20,7 +20,7 @@ #include -#if defined(OPENSSL_X86_64) +#if defined(OPENSSL_X86_64) && !defined(OPENSSL_NO_ASM) int CRYPTO_have_hwrand(void) { return (OPENSSL_ia32cap_P[1] & (1u << 30)) != 0;