From 28552b543b981dbca753ef07b31011b42568f8b1 Mon Sep 17 00:00:00 2001 From: Romain Thomas Date: Sun, 8 Dec 2024 09:47:44 +0100 Subject: [PATCH] Disable AESNI for x86 target --- CMakeLists.txt | 4 ++++ config/mbedtls/config.h | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 config/mbedtls/config.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 56ffea8d75..fc2b679214 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,6 +153,10 @@ else() MbedTLS::mbedcrypto MbedTLS::mbedx509) endif() +target_compile_definitions(LIB_LIEF PRIVATE + -DMBEDTLS_CONFIG_FILE="${CMAKE_CURRENT_SOURCE_DIR}/config/mbedtls/config.h" +) + if(WIN32 AND BUILD_SHARED_LIBS) target_link_libraries(LIB_LIEF PRIVATE ws2_32) endif() diff --git a/config/mbedtls/config.h b/config/mbedtls/config.h new file mode 100644 index 0000000000..1007c99aee --- /dev/null +++ b/config/mbedtls/config.h @@ -0,0 +1,5 @@ +#include "mbedtls/mbedtls_config.h" + +#if defined (MBEDTLS_ARCH_IS_X86) +#undef MBEDTLS_AESNI_C +#endif