Skip to content

Commit edc06d0

Browse files
committed
fixup
1 parent 54d5243 commit edc06d0

File tree

1 file changed

+31
-15
lines changed

1 file changed

+31
-15
lines changed

src/trusted/service_runtime/CMakeLists.txt

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ if (LINUX AND NOT BUILD_ELSEWHERE)
469469
elseif (ARCH STREQUAL "armhf")
470470
set(LD_EMUL "armelf_linux_eabi")
471471
set(RESERVE_TOP "0x40002000")
472-
set(COMPILER_OVERRIDE "--compiler arm-linux-gnueabihf-gcc")
472+
set(COMPILER_OVERRIDE "arm-linux-gnueabihf-gcc")
473473
elseif (ARCH STREQUAL "mips32")
474474
set(LD_EMOUL "elf32ltsmip")
475475
set(RESERVE_TOP "0x40008000")
@@ -482,19 +482,35 @@ if (LINUX AND NOT BUILD_ELSEWHERE)
482482
set_target_properties(nacl_bootstrap PROPERTIES COMPILE_FLAGS "${BOOTSTRAP_FLAGS_STRING}")
483483
set_target_properties(nacl_bootstrap PROPERTIES COMPILE_DEFINITIONS "${BOOTSTRAP_DEFINITIONS_STRING}")
484484

485-
add_custom_target(nacl_bootstrap_raw
486-
COMMAND env CXX="${CMAKE_CXX_COMPILER}" "${PYTHON}"
487-
"${CMAKE_CURRENT_LIST_DIR}/linux/ld_bfd.py" "${COMPILER_OVERRIDE}"
488-
-m "${LD_EMUL}"
489-
--build-id
490-
-static
491-
-z "max-page-size=0x1000"
492-
--defsym RESERVE_TOP="${RESERVE_TOP}"
493-
--script "${CMAKE_CURRENT_LIST_DIR}/linux/nacl_bootstrap.x"
494-
-o "${CMAKE_BINARY_DIR}/src/trusted/service_runtime/nacl_bootstrap_raw"
495-
"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/nacl_bootstrap.dir/linux/nacl_bootstrap.c.o"
496-
DEPENDS nacl_bootstrap
497-
)
485+
if (COMPILER_OVERRIDE)
486+
add_custom_target(nacl_bootstrap_raw
487+
COMMAND env CXX="${CMAKE_CXX_COMPILER}" "${PYTHON}"
488+
"${CMAKE_CURRENT_LIST_DIR}/linux/ld_bfd.py" --compiler "${COMPILER_OVERRIDE}"
489+
-m "${LD_EMUL}"
490+
--build-id
491+
-static
492+
-z "max-page-size=0x1000"
493+
--defsym RESERVE_TOP="${RESERVE_TOP}"
494+
--script "${CMAKE_CURRENT_LIST_DIR}/linux/nacl_bootstrap.x"
495+
-o "${CMAKE_BINARY_DIR}/src/trusted/service_runtime/nacl_bootstrap_raw"
496+
"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/nacl_bootstrap.dir/linux/nacl_bootstrap.c.o"
497+
DEPENDS nacl_bootstrap
498+
)
499+
else()
500+
add_custom_target(nacl_bootstrap_raw
501+
COMMAND env CXX="${CMAKE_CXX_COMPILER}" "${PYTHON}"
502+
"${CMAKE_CURRENT_LIST_DIR}/linux/ld_bfd.py"
503+
-m "${LD_EMUL}"
504+
--build-id
505+
-static
506+
-z "max-page-size=0x1000"
507+
--defsym RESERVE_TOP="${RESERVE_TOP}"
508+
--script "${CMAKE_CURRENT_LIST_DIR}/linux/nacl_bootstrap.x"
509+
-o "${CMAKE_BINARY_DIR}/src/trusted/service_runtime/nacl_bootstrap_raw"
510+
"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/nacl_bootstrap.dir/linux/nacl_bootstrap.c.o"
511+
DEPENDS nacl_bootstrap
512+
)
513+
endif()
498514

499515
add_custom_target(nacl_helper_bootstrap
500516
COMMAND "${PYTHON}"
@@ -504,7 +520,7 @@ if (LINUX AND NOT BUILD_ELSEWHERE)
504520
DEPENDS nacl_bootstrap_raw
505521
)
506522

507-
add_dependencies(sel_ldr nacl_bootstrap_raw)
523+
add_dependencies(sel_ldr nacl_helper_bootstrap)
508524

509525
#TODO: bootstrap_raw = bootstrap_env.Command(
510526
#TODO: 'nacl_bootstrap_raw',

0 commit comments

Comments
 (0)