Skip to content

Commit 63bbde8

Browse files
committed
cmake: use size optimization for nacl_helper_bootstrap, with toplevel-reorder disabled on armhf
The -ftoplevel-reorder option breaks the build for armhf.
1 parent 05ff111 commit 63bbde8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/trusted/service_runtime/linux/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ if (ANDROID)
1616
remove_definitions(-D_FORTIFY_SOURCE=2)
1717
endif()
1818

19-
# Using optimizations when building with GCC breaks the program on armhf.
20-
if (NOT DAEMON_CXX_COMPILER_Clang_COMPATIBILITY)
21-
list(APPEND BOOTSTRAP_FLAGS "-O0")
19+
list(APPEND BOOTSTRAP_FLAGS "-Os")
20+
21+
# Using this optimization when building with GCC breaks the program on armhf:
22+
# > Illegal instruction
23+
if (NOT DAEMON_CXX_COMPILER_Clang_COMPATIBILITY AND (ARCH_armhf OR ARCH_armel))
24+
list(APPEND BOOTSTRAP_FLAGS -fno-toplevel-reorder)
2225
endif()
2326

2427
# The src/trusted/service_runtime/build.scons file was only setting them on

0 commit comments

Comments
 (0)