cryptopp: add missing bits used by SIMD on aarch64
externals/cryptopp/cryptopp/crc-simd.cpp:97:13: error: use of undeclared identifier '__crc32w' w = __crc32w(w,x); ^ externals/cryptopp/cryptopp/rijndael-simd.cpp:126:25: error: use of undeclared identifier 'vaeseq_u8' uint8x16_t r1 = vaeseq_u8(data, key); ^ externals/cryptopp/cryptopp/sha-simd.cpp:109:25: error: use of undeclared identifier 'vsha1cq_u32' uint32x4_t r1 = vsha1cq_u32 (data1, 0, data2); ^ /usr/bin/ld: error: externals/cryptopp/cryptopp/cpu.cpp:(function CryptoPP::DetectArmFeatures()): undefined symbol 'CryptoPP::CPU_ProbeNEON()' /usr/bin/ld: error: externals/cryptopp/cryptopp/cpu.cpp:(function CryptoPP::DetectArmFeatures()): undefined symbol 'CryptoPP::CPU_ProbeCRC32()' /usr/bin/ld: error: externals/cryptopp/cryptopp/cpu.cpp:(function CryptoPP::DetectArmFeatures()): undefined symbol 'CryptoPP::CPU_ProbePMULL()'
This commit is contained in:
parent
65f5bc73a0
commit
2772362f05
|
@ -133,6 +133,7 @@ set(cryptopp_SOURCES
|
||||||
cryptopp/authenc.cpp
|
cryptopp/authenc.cpp
|
||||||
cryptopp/basecode.cpp
|
cryptopp/basecode.cpp
|
||||||
cryptopp/ccm.cpp
|
cryptopp/ccm.cpp
|
||||||
|
cryptopp/crc-simd.cpp
|
||||||
cryptopp/des.cpp
|
cryptopp/des.cpp
|
||||||
cryptopp/dessp.cpp
|
cryptopp/dessp.cpp
|
||||||
cryptopp/dll.cpp
|
cryptopp/dll.cpp
|
||||||
|
@ -140,6 +141,7 @@ set(cryptopp_SOURCES
|
||||||
cryptopp/ecp.cpp
|
cryptopp/ecp.cpp
|
||||||
cryptopp/filters.cpp
|
cryptopp/filters.cpp
|
||||||
cryptopp/fips140.cpp
|
cryptopp/fips140.cpp
|
||||||
|
cryptopp/gcm-simd.cpp
|
||||||
cryptopp/gf2n.cpp
|
cryptopp/gf2n.cpp
|
||||||
cryptopp/gfpcrypt.cpp
|
cryptopp/gfpcrypt.cpp
|
||||||
cryptopp/hex.cpp
|
cryptopp/hex.cpp
|
||||||
|
@ -151,6 +153,7 @@ set(cryptopp_SOURCES
|
||||||
cryptopp/modes.cpp
|
cryptopp/modes.cpp
|
||||||
cryptopp/mqueue.cpp
|
cryptopp/mqueue.cpp
|
||||||
cryptopp/nbtheory.cpp
|
cryptopp/nbtheory.cpp
|
||||||
|
cryptopp/neon-simd.cpp
|
||||||
cryptopp/oaep.cpp
|
cryptopp/oaep.cpp
|
||||||
cryptopp/osrng.cpp
|
cryptopp/osrng.cpp
|
||||||
cryptopp/pubkey.cpp
|
cryptopp/pubkey.cpp
|
||||||
|
@ -190,19 +193,40 @@ endif()
|
||||||
|
|
||||||
if ((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT CRYPTOPP_DISABLE_ASM)
|
if ((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT CRYPTOPP_DISABLE_ASM)
|
||||||
check_cxx_compiler_flag(-msse2 CRYPTOPP_HAS_MSSE2)
|
check_cxx_compiler_flag(-msse2 CRYPTOPP_HAS_MSSE2)
|
||||||
|
check_cxx_compiler_flag(-mssse3 CRYPTOPP_HAS_MSSSE3)
|
||||||
check_cxx_compiler_flag(-msse4.1 CRYPTOPP_HAS_MSSE41)
|
check_cxx_compiler_flag(-msse4.1 CRYPTOPP_HAS_MSSE41)
|
||||||
check_cxx_compiler_flag(-msse4.2 CRYPTOPP_HAS_MSSE42)
|
check_cxx_compiler_flag(-msse4.2 CRYPTOPP_HAS_MSSE42)
|
||||||
check_cxx_compiler_flag(-maes CRYPTOPP_HAS_MAES)
|
check_cxx_compiler_flag(-maes CRYPTOPP_HAS_MAES)
|
||||||
|
check_cxx_compiler_flag(-mpclmul CRYPTOPP_HAS_PCLMUL)
|
||||||
check_cxx_compiler_flag(-msha CRYPTOPP_HAS_MSHA)
|
check_cxx_compiler_flag(-msha CRYPTOPP_HAS_MSHA)
|
||||||
|
check_cxx_compiler_flag(-march=armv8-a+crc CRYPTOPP_HAS_ARMV8_CRC32)
|
||||||
|
check_cxx_compiler_flag(-march=armv8-a+crypto CRYPTOPP_HAS_ARMV8_CRYPTO)
|
||||||
if (CRYPTOPP_HAS_MSSE2)
|
if (CRYPTOPP_HAS_MSSE2)
|
||||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/sse-simd.cpp PROPERTIES COMPILE_FLAGS "-msse2")
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/sse-simd.cpp PROPERTIES COMPILE_FLAGS "-msse2")
|
||||||
endif()
|
endif()
|
||||||
|
if (CRYPTOPP_HAS_MSSSE3 AND CRYPTOPP_HAS_MAES AND CRYPTOPP_HAS_PCLMUL)
|
||||||
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/gcm-simd.cpp
|
||||||
|
PROPERTIES COMPILE_FLAGS "-mssse3 -maes -mpclmul")
|
||||||
|
endif()
|
||||||
if (CRYPTOPP_HAS_MSSE41 AND CRYPTOPP_HAS_MAES)
|
if (CRYPTOPP_HAS_MSSE41 AND CRYPTOPP_HAS_MAES)
|
||||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/rijndael-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1 -maes")
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/rijndael-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1 -maes")
|
||||||
endif()
|
endif()
|
||||||
|
if (CRYPTOPP_HAS_MSSE42)
|
||||||
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/crc-simd.cpp
|
||||||
|
PROPERTIES COMPILE_FLAGS "-msse4.2")
|
||||||
|
endif()
|
||||||
if (CRYPTOPP_HAS_MSSE42 AND CRYPTOPP_HAS_MSHA)
|
if (CRYPTOPP_HAS_MSSE42 AND CRYPTOPP_HAS_MSHA)
|
||||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/sha-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha")
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/sha-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha")
|
||||||
endif()
|
endif()
|
||||||
|
if (CRYPTOPP_HAS_ARMV8_CRC32)
|
||||||
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/crc-simd.cpp
|
||||||
|
PROPERTIES COMPILE_FLAGS "-march=armv8-a+crc")
|
||||||
|
endif()
|
||||||
|
if (CRYPTOPP_HAS_ARMV8_CRYPTO)
|
||||||
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/rijndael-simd.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/sha-simd.cpp
|
||||||
|
PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#============================================================================
|
#============================================================================
|
||||||
|
|
Reference in New Issue