Skip to content

Commit fecdb1e

Browse files
committed
fixup
1 parent 9d244bc commit fecdb1e

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ if (ARCH STREQUAL "i686")
1212
set(ARCH_SUFFIX "_x86_32")
1313
elseif (ARCH STREQUAL "amd64")
1414
set(ARCH_SUFFIX "_X86_64")
15-
elseif (ARCH STREQUAL "arm")
15+
elseif (ARCH STREQUAL "armhf")
1616
set(ARCH_SUFFIX "_arm")
1717
elseif (ARCH STREQUAL "mips32")
1818
set(ARCH_SUFFIX "_mips32")
1919
endif()
2020

21+
# FIXME: In src/shared/imc/build.scons it is only done on Linux bot not on Android.
22+
find_library(LIBRT rt)
23+
2124
add_subdirectory(src/shared/gio)
2225
add_subdirectory(src/shared/imc)
2326
add_subdirectory(src/shared/platform)
@@ -34,6 +37,8 @@ add_subdirectory(src/trusted/validator)
3437
if (ARCH STREQUAL "i686" OR ARCH STREQUAL "amd64")
3538
add_subdirectory(src/trusted/validator_x86)
3639
add_subdirectory(src/trusted/validator_ragel)
40+
elseif (ARCH STREQUAL "armhf")
41+
add_subdirectory(src/trusted/validator_arm)
3742
endif()
3843

3944
add_subdirectory(src/trusted/service_runtime)

cmake/NaClFlags.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,4 @@ if (LINUX)
8383
set_linker_flag("-Wl,-z,noexecstack")
8484
set_c_cxx_flag("-fPIE")
8585
set_linker_flag("-pie")
86-
# FIXME: In src/shared/imc/build.scons it is only done on Linux bot not on Android.
87-
find_library(LIBRT rt)
8886
endif()

src/shared/imc/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
if (LINUX AND NOT ANDROID)
22
# FIXME: librt is already set in LIBS_BASE for Linux,
33
# but src/shared/imc/build.scons was setting for Linux but not Android.
4-
list(APPEND LIBS_NACL_IMC ${LIBRT})
4+
if (LIBRT)
5+
list(APPEND LIBS_NACL_IMC "${LIBRT}")
6+
endif()
57
endif()
68

79
list(APPEND NACL_IMC_INPUTS "nacl_imc_common.cc")

src/trusted/platform_qualify/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if (ARCH STREQUAL "i686" OR ARCH STREQUAL "amd64")
3131
elseif (ARCH STREQUAL "amd64")
3232
list(APPEND PQL_INPUTS "arch/x86_64/nacl_dep_qualify_arch.c")
3333
endif()
34-
elseif (ARCH STREQUAL "arm")
34+
elseif (ARCH STREQUAL "armhf")
3535
list(APPEND PQL_INPUTS
3636
# Compile ARM primitives for checking XN functionality
3737
"arch/arm/nacl_dep_qualify_arch.c"

src/trusted/service_runtime/CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ list(APPEND LDR_LIBS validators)
312312

313313
if (ARCH STREQUAL "i686" OR ARCH STREQUAL "amd64")
314314
list(APPEND LDR_LIBS dfa_validate_caller)
315-
elseif (ARCH STREAQUAL "arm")
315+
elseif (ARCH STREQUAL "armhf")
316316
list(APPEND LDR_LIBS ncvalidate_arm_v2)
317317
list(APPEND LDR_LIBS arm_validator_reporters)
318318
endif()
@@ -350,13 +350,18 @@ if (WIN32)
350350
endif()
351351

352352
if (NOT COVERAGE_ENABLED OR NOT WIN32)
353+
if (LIBRT)
354+
list(APPEND LDR_LIBS "${LIBRT}")
355+
endif()
356+
353357
#TODO: sel_main_objs = [env.ComponentObject('nacl_test_injection_main.c')]
354358
add_library(nacl_test_injection_main OBJECT "nacl_test_injection_main.c")
355359
list(APPEND LDR_LIBS nacl_test_injection_main)
356360
#TODO: SEL_LDR_NODE = env.ComponentProgram('sel_ldr', sel_main_objs, EXTRA_LIBS=['sel_main'])
357-
# WIP:
361+
358362
add_executable(sel_ldr)
359-
target_link_libraries(sel_ldr ${LDR_LIBS} ${LIBRT})
363+
target_link_libraries(sel_ldr ${LDR_LIBS})
364+
360365

361366
if (APPLE)
362367
# This target exists only to check that the service_runtime code

0 commit comments

Comments
 (0)