@@ -469,7 +469,7 @@ if (LINUX AND NOT BUILD_ELSEWHERE)
469
469
elseif (ARCH STREQUAL "armhf" )
470
470
set (LD_EMUL "armelf_linux_eabi" )
471
471
set (RESERVE_TOP "0x40002000" )
472
- set (COMPILER_OVERRIDE "--compiler arm-linux-gnueabihf-gcc" )
472
+ set (COMPILER_OVERRIDE "arm-linux-gnueabihf-gcc" )
473
473
elseif (ARCH STREQUAL "mips32" )
474
474
set (LD_EMOUL "elf32ltsmip" )
475
475
set (RESERVE_TOP "0x40008000" )
@@ -482,19 +482,35 @@ if (LINUX AND NOT BUILD_ELSEWHERE)
482
482
set_target_properties (nacl_bootstrap PROPERTIES COMPILE_FLAGS "${BOOTSTRAP_FLAGS_STRING} " )
483
483
set_target_properties (nacl_bootstrap PROPERTIES COMPILE_DEFINITIONS "${BOOTSTRAP_DEFINITIONS_STRING} " )
484
484
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 ()
498
514
499
515
add_custom_target (nacl_helper_bootstrap
500
516
COMMAND "${PYTHON} "
@@ -504,7 +520,7 @@ if (LINUX AND NOT BUILD_ELSEWHERE)
504
520
DEPENDS nacl_bootstrap_raw
505
521
)
506
522
507
- add_dependencies (sel_ldr nacl_bootstrap_raw )
523
+ add_dependencies (sel_ldr nacl_helper_bootstrap )
508
524
509
525
#TODO: bootstrap_raw = bootstrap_env.Command(
510
526
#TODO: 'nacl_bootstrap_raw',
0 commit comments