diff options
author | Pete Bentley <prb@google.com> | 2019-08-09 14:24:27 +0000 |
---|---|---|
committer | Pete Bentley <prb@google.com> | 2019-08-09 14:24:27 +0000 |
commit | a5c947b7c91bac52eeb5086507b67e52a59ef980 (patch) | |
tree | 3725c3e206175c177a448c50d41ad2c2589a07fa /src/crypto/fipsmodule/CMakeLists.txt | |
parent | 228bd6249d17f351ea66508b3ec3112ed1cbdf30 (diff) | |
download | boringssl-a5c947b7c91bac52eeb5086507b67e52a59ef980.tar.gz |
Revert "Revert "external/boringssl: Sync to 81080a729af568f7b5fde92b9170cc17065027c9.""
This reverts commit 228bd6249d17f351ea66508b3ec3112ed1cbdf30.
Reason for revert: All fixes submitted for modules affected by the ENGINE_free API change.
Change-Id: I30fafafa13ec0a6390f4a9211fbf3122a8b4865f
Diffstat (limited to 'src/crypto/fipsmodule/CMakeLists.txt')
-rw-r--r-- | src/crypto/fipsmodule/CMakeLists.txt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/crypto/fipsmodule/CMakeLists.txt b/src/crypto/fipsmodule/CMakeLists.txt index d1e2cb9d..e9788200 100644 --- a/src/crypto/fipsmodule/CMakeLists.txt +++ b/src/crypto/fipsmodule/CMakeLists.txt @@ -129,6 +129,10 @@ perlasm(x86_64-mont.${ASM_EXT} bn/asm/x86_64-mont.pl) perlasm(x86-mont.${ASM_EXT} bn/asm/x86-mont.pl) if(FIPS_DELOCATE) + if(FIPS_SHARED) + error("Can't set both delocate and shared mode for FIPS build") + endif() + if(OPENSSL_NO_ASM) # If OPENSSL_NO_ASM was defined then ASM will not have been enabled, but in # FIPS mode we have to have it because the module build requires going via @@ -189,12 +193,49 @@ if(FIPS_DELOCATE) OBJECT + fips_shared_support.c is_fips.c ) add_dependencies(fipsmodule global_target) set_target_properties(fipsmodule PROPERTIES LINKER_LANGUAGE C) +elseif(FIPS_SHARED) + if(NOT BUILD_SHARED_LIBS) + error("FIPS_SHARED set but not BUILD_SHARED_LIBS") + endif() + + add_library( + fipsmodule + + OBJECT + + fips_shared_support.c + is_fips.c + ) + + add_dependencies(fipsmodule global_target) + + add_library( + bcm_library + + STATIC + + bcm.c + + ${BCM_ASM_SOURCES} + ) + + add_dependencies(bcm_library global_target) + + add_custom_command( + OUTPUT bcm.o + COMMAND ld -r -T ${CMAKE_CURRENT_SOURCE_DIR}/fips_shared.lds -o bcm.o --whole-archive $<TARGET_FILE:bcm_library> + DEPENDS bcm_library fips_shared.lds + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + + add_custom_target(bcm_o_target DEPENDS bcm.o) else() add_library( fipsmodule @@ -202,6 +243,7 @@ else() OBJECT bcm.c + fips_shared_support.c is_fips.c ${BCM_ASM_SOURCES} |