forked from wolfSSL/wolfssl
Merge pull request #5328 from haydenroche5/cmake_sp_math_all_default
Make changes to CMake to support SP math default.
This commit is contained in:
@ -1425,24 +1425,9 @@ endif()
|
||||
# - wolfCrypt only
|
||||
|
||||
# fastmath
|
||||
set(FASTMATH_DEFAULT "no")
|
||||
|
||||
if(("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") OR
|
||||
("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64"))
|
||||
set(FASTMATH_DEFAULT "yes")
|
||||
endif()
|
||||
|
||||
if(WOLFSSL_LINUXKM_DEFAULTS)
|
||||
set(FASTMATH_DEFAULT "no")
|
||||
endif()
|
||||
|
||||
if(WOLFSSL_SP_MATH)
|
||||
set(FASTMATH_DEFAULT "no")
|
||||
endif()
|
||||
|
||||
add_option("WOLFSSL_FAST_MATH"
|
||||
"Enable fast math ops (default: enabled on x86_64/aarch64)"
|
||||
${FASTMATH_DEFAULT} "yes;no")
|
||||
"Enable fast math ops (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
if(WOLFSSL_FAST_MATH)
|
||||
# turn off fastmath if leanpsk on or asn off (w/o DH and ECC)
|
||||
@ -1468,6 +1453,11 @@ endif()
|
||||
|
||||
# TODO: - Fast huge math
|
||||
|
||||
# SP math all
|
||||
add_option("WOLFSSL_SP_MATH_ALL"
|
||||
"Enable Single Precision math implementation for full algorithm suite (default: enabled)"
|
||||
"yes" "yes;no")
|
||||
|
||||
# Enable examples, used to disable examples
|
||||
if(WOLFSSL_LINUX_KM)
|
||||
set(EXAMPLES_DEFAULT "no")
|
||||
|
@ -266,7 +266,7 @@ function(generate_build_flags)
|
||||
if(WOLFSSL_SP_X86_64_ASM OR WOLFSSL_USER_SETTINGS)
|
||||
set(BUILD_SP_X86_64 "yes" PARENT_SCOPE)
|
||||
endif()
|
||||
if(WOLFSSL_SP_MATH OR WOLFSSL_USER_SETTINGS)
|
||||
if(WOLFSSL_SP_MATH OR WOLFSSL_SP_MATH_ALL OR WOLFSSL_USER_SETTINGS)
|
||||
set(BUILD_SP_INT "yes" PARENT_SCOPE)
|
||||
endif()
|
||||
set(BUILD_FAST_RSA ${WOLFSSL_FAST_RSA} PARENT_SCOPE)
|
||||
@ -541,14 +541,13 @@ function(generate_lib_src_list LIB_SOURCES)
|
||||
list(APPEND LIB_SOURCES wolfcrypt/src/sp_arm64.c)
|
||||
endif()
|
||||
|
||||
if(BUILD_SP_INT)
|
||||
list(APPEND LIB_SOURCES wolfcrypt/src/sp_int.c)
|
||||
endif()
|
||||
|
||||
if(BUILD_SP_ARM_CORTEX)
|
||||
list(APPEND LIB_SOURCES wolfcrypt/src/sp_cortexm.c)
|
||||
endif()
|
||||
endif()
|
||||
if(BUILD_SP_INT)
|
||||
list(APPEND LIB_SOURCES wolfcrypt/src/sp_int.c)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_FIPS_V2)
|
||||
if(BUILD_AES)
|
||||
|
Reference in New Issue
Block a user