|
|
@@ -74,11 +74,18 @@ if(FIPS) |
|
|
|
set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE) |
|
|
|
endfunction() |
|
|
|
|
|
|
|
JOIN("${BCM_ASM_SOURCES}" ",${CMAKE_CURRENT_BINARY_DIR}/" BCM_ASM_SOURCES_COMMA_SEP) |
|
|
|
set(DELOCATE_AS_FLAG) |
|
|
|
set(DELOCATE_AS_ARG) |
|
|
|
|
|
|
|
if(NOT "${BCM_ASM_SOURCES}" STREQUAL "") |
|
|
|
set(DELOCATE_AS_FLAG "-as") |
|
|
|
JOIN("${BCM_ASM_SOURCES}" ",${CMAKE_CURRENT_BINARY_DIR}/" BCM_ASM_SOURCES_COMMA_SEP) |
|
|
|
SET(DELOCATE_AS_ARG "${CMAKE_CURRENT_BINARY_DIR}/${BCM_ASM_SOURCES_COMMA_SEP}") |
|
|
|
endif() |
|
|
|
|
|
|
|
add_custom_command( |
|
|
|
OUTPUT bcm-delocated.S |
|
|
|
COMMAND ${GO_EXECUTABLE} run crypto/fipsmodule/delocate.go crypto/fipsmodule/ar.go crypto/fipsmodule/const.go -a $<TARGET_FILE:bcm_c_generated_asm> -as ${CMAKE_CURRENT_BINARY_DIR}/${BCM_ASM_SOURCES_COMMA_SEP} -o ${CMAKE_CURRENT_BINARY_DIR}/bcm-delocated.S |
|
|
|
COMMAND ${GO_EXECUTABLE} run crypto/fipsmodule/delocate.go crypto/fipsmodule/ar.go crypto/fipsmodule/const.go -a $<TARGET_FILE:bcm_c_generated_asm> ${DELOCATE_AS_FLAG} ${DELOCATE_AS_ARG} -o ${CMAKE_CURRENT_BINARY_DIR}/bcm-delocated.S |
|
|
|
DEPENDS bcm_c_generated_asm ${BCM_ASM_SOURCES} delocate.go ar.go const.go |
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
|
|
|
) |
|
|
|