diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-01-04 10:52:32 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-01-04 10:52:32 +0200 |
commit | 6268bdadf70609953c57f62e051defd8f0041046 (patch) | |
tree | 07fa0a018982e2f1b902f4cdac34275af99d6c80 /extra | |
parent | 3f38e2a452575e22813c363a8f7900f727f6b16b (diff) | |
parent | 1bf9acceef252000618a137853638c612339024b (diff) | |
download | mariadb-git-6268bdadf70609953c57f62e051defd8f0041046.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'extra')
-rw-r--r-- | extra/wolfssl/CMakeLists.txt | 57 | ||||
m--------- | extra/wolfssl/wolfssl | 0 |
2 files changed, 29 insertions, 28 deletions
diff --git a/extra/wolfssl/CMakeLists.txt b/extra/wolfssl/CMakeLists.txt index 953d377ebcf..c99fb155dd6 100644 --- a/extra/wolfssl/CMakeLists.txt +++ b/extra/wolfssl/CMakeLists.txt @@ -9,20 +9,32 @@ ENDIF() IF(CMAKE_SIZEOF_VOID_P MATCHES 8) IF(MSVC) SET(WOLFSSL_INTELASM ON) + SET(WOLFSSL_X86_64_BUILD 1) + SET(HAVE_INTEL_RDSEED 1) + SET(HAVE_INTEL_RDRAND 1) ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64") + SET(WOLFSSL_X86_64_BUILD 1) IF(CMAKE_C_COMPILER_ID MATCHES GNU AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9) MESSAGE_ONCE(NO_INTEL_ASSEMBLY "Disable Intel assembly for WolfSSL - compiler is too old") - ELSEIF(WITH_MSAN) - MESSAGE_ONCE(MSAN_CANT_HANDLE_IT - "Disable Intel assembly for WolfSSL - MSAN can't handle it") ELSE() - MY_CHECK_C_COMPILER_FLAG(-maes) - MY_CHECK_C_COMPILER_FLAG(-msse4) - MY_CHECK_C_COMPILER_FLAG(-mpclmul) + IF(WITH_MSAN) + MESSAGE_ONCE(MSAN_CANT_HANDLE_IT + "Disable Intel assembly for WolfSSL - MSAN can't handle it") + ELSE() + MY_CHECK_C_COMPILER_FLAG(-maes) + MY_CHECK_C_COMPILER_FLAG(-msse4) + MY_CHECK_C_COMPILER_FLAG(-mpclmul) + IF(have_C__maes AND have_C__msse4 AND have_C__mpclmul) + SET(WOLFSSL_INTELASM ON) + ENDIF() + ENDIF() MY_CHECK_C_COMPILER_FLAG(-mrdrnd) MY_CHECK_C_COMPILER_FLAG(-mrdseed) - IF(have_C__maes AND have_C__msse4 AND have_C__mpclmul) - SET(WOLFSSL_INTELASM ON) + IF(have_C__mrdrnd) + SET(HAVE_INTEL_RDRAND ON) + ENDIF() + IF(have_C__mrdseed) + SET(HAVE_INTEL_RDSEED ON) ENDIF() ENDIF() ENDIF() @@ -44,7 +56,7 @@ ADD_DEFINITIONS(-DWOLFSSL_LIB -DBUILDING_WOLFSSL) INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl) IF(MSVC) # size_t to long truncation warning - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd4267 -wd4334 -wd4028") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd4267 -wd4334 -wd4028 -wd4244") ENDIF() ADD_CONVENIENCE_LIBRARY(wolfssl ${WOLFSSL_SOURCES}) @@ -109,33 +121,22 @@ ELSE() SET(WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR}/integer.c) ENDIF() -IF(WOLFSSL_INTELASM) - SET(WOLFSSL_AESNI 1) - +IF(WOLFSSL_X86_64_BUILD) LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/cpuid.c) IF(MSVC) + SET(WOLFSSL_AESNI 1) LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/aes_asm.asm) - SET(WOLFSSL_X86_64_BUILD 1) - SET(HAVE_INTEL_RDSEED 1) - SET(HAVE_INTEL_RDRAND 1) IF(CMAKE_C_COMPILER_ID MATCHES Clang) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes -msse4.2 -mpclmul -mrdrnd -mrdseed") ENDIF() - ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64") + ELSEIF(WOLFSSL_INTELASM) + SET(WOLFSSL_AESNI 1) SET(USE_INTEL_SPEEDUP 1) LIST(APPEND WOLFCRYPT_SOURCES - ${WOLFCRYPT_SRCDIR}/aes_asm.S - ${WOLFCRYPT_SRCDIR}/sha512_asm.S - ${WOLFCRYPT_SRCDIR}/sha256_asm.S) - ADD_DEFINITIONS(-maes -msse4 -mpclmul) - IF(have_C__mrdrnd) - SET(HAVE_INTEL_RDRAND 1) - ADD_DEFINITIONS(-mrdrnd) - ENDIF() - IF(have_C__mrdseed) - SET(HAVE_INTEL_RDSEED 1) - ADD_DEFINITIONS(-mrdseed) - ENDIF() + ${WOLFCRYPT_SRCDIR}/aes_asm.S + ${WOLFCRYPT_SRCDIR}/sha512_asm.S + ${WOLFCRYPT_SRCDIR}/sha256_asm.S) + ADD_DEFINITIONS(-maes -msse4.2 -mpclmul) ENDIF() ENDIF() diff --git a/extra/wolfssl/wolfssl b/extra/wolfssl/wolfssl -Subproject e116c89a58af750421d82ece13f80516d2bde02 +Subproject 9c87f979a7f1d3a6d786b260653d566c1d31a1c |