diff options
Diffstat (limited to 'deps/boringssl/src/crypto/fipsmodule/CMakeLists.txt')
-rw-r--r-- | deps/boringssl/src/crypto/fipsmodule/CMakeLists.txt | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/deps/boringssl/src/crypto/fipsmodule/CMakeLists.txt b/deps/boringssl/src/crypto/fipsmodule/CMakeLists.txt index 83cf3f7..73f8a02 100644 --- a/deps/boringssl/src/crypto/fipsmodule/CMakeLists.txt +++ b/deps/boringssl/src/crypto/fipsmodule/CMakeLists.txt @@ -1,6 +1,6 @@ include_directories(../../include) -if(${ARCH} STREQUAL "x86_64") +if(ARCH STREQUAL "x86_64") set( BCM_ASM_SOURCES @@ -22,7 +22,7 @@ if(${ARCH} STREQUAL "x86_64") ) endif() -if(${ARCH} STREQUAL "x86") +if(ARCH STREQUAL "x86") set( BCM_ASM_SOURCES @@ -40,7 +40,7 @@ if(${ARCH} STREQUAL "x86") ) endif() -if(${ARCH} STREQUAL "arm") +if(ARCH STREQUAL "arm") set( BCM_ASM_SOURCES @@ -56,7 +56,7 @@ if(${ARCH} STREQUAL "arm") ) endif() -if(${ARCH} STREQUAL "aarch64") +if(ARCH STREQUAL "aarch64") set( BCM_ASM_SOURCES @@ -71,7 +71,7 @@ if(${ARCH} STREQUAL "aarch64") ) endif() -if(${ARCH} STREQUAL "ppc64le") +if(ARCH STREQUAL "ppc64le") set( BCM_ASM_SOURCES @@ -160,7 +160,7 @@ if(FIPS_DELOCATE) bcm.c ) - if(${ARCH} STREQUAL "aarch64") + if(ARCH STREQUAL "aarch64") # Perlasm output on Aarch64 needs to pass through the C preprocessor before # it can be parsed by delocate. foreach(asm ${BCM_ASM_SOURCES}) @@ -199,12 +199,15 @@ if(FIPS_DELOCATE) set_target_properties(bcm_hashunset PROPERTIES LINKER_LANGUAGE C) set(MAYBE_INJECT_HASH_SHA256_FLAG "") - if (ARCH STREQUAL "aarch64") + # If building with OPENSSL_NO_ASM then ARCH will be "generic", but we still + # need to use SHA-256. Since this only matters for FIPS, we only need to + # worry about the Linux spelling of AArch64. + if (ARCH STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") set(MAYBE_INJECT_HASH_SHA256_FLAG "-sha256") endif() go_executable(inject_hash - boringssl.googlesource.com/boringssl/util/fipstools/inject_hash) + boringssl.googlesource.com/boringssl/util/fipstools/inject_hash) add_custom_command( OUTPUT bcm.o COMMAND ./inject_hash -o bcm.o -in-archive $<TARGET_FILE:bcm_hashunset> ${MAYBE_INJECT_HASH_SHA256_FLAG} @@ -223,7 +226,6 @@ if(FIPS_DELOCATE) OBJECT fips_shared_support.c - is_fips.c ) add_dependencies(fipsmodule global_target) @@ -240,7 +242,6 @@ elseif(FIPS_SHARED) OBJECT fips_shared_support.c - is_fips.c ) add_dependencies(fipsmodule global_target) @@ -273,7 +274,6 @@ else() bcm.c fips_shared_support.c - is_fips.c ${BCM_ASM_SOURCES} ) |