File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
src/trusted/service_runtime/linux Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 11option (USE_WERROR "Tell the compiler to make the build fail when warnings are present." OFF )
22
3+ if ("${ARCH} " STREQUAL "armhf" )
4+ option (USE_ARMHF_LARGE_PAGESIZE "Build armhf binaries with large page size." ON )
5+ list (APPEND INHERITED_OPTIONS "USE_ARMHF_LARGE_PAGESIZE" )
6+ endif ()
7+
38macro (set_ASM_flag FLAG)
49 set (lang ASM)
510 if (${ARGC} GREATER 1)
@@ -84,6 +89,14 @@ macro(set_linker_flag FLAG)
8489 endforeach ()
8590endmacro ()
8691
92+ if (USE_ARMHF_LARGE_PAGESIZE)
93+ set (MAX_PAGE_SIZE 0x10000)
94+ else ()
95+ set (MAX_PAGE_SIZE 0x1000)
96+ endif ()
97+
98+ set_linker_flag("-Wl,-z,max-page-size=${MAX_PAGE_SIZE} " )
99+
87100#TODO: Import from SetUpClang() from (root)/SConstruct.
88101#TODO: This is mostly ASAN configurations.
89102
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ add_custom_target(nacl_bootstrap_raw
113113 -m "${LD_EMUL} "
114114 --build -id
115115 -static
116- -z "max-page-size=0x1000 "
116+ -z "max-page-size=${MAX_PAGE_SIZE} "
117117 --defsym RESERVE_TOP="${RESERVE_TOP} "
118118 --script "${CMAKE_CURRENT_LIST_DIR} /nacl_bootstrap.x"
119119 -o "${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /nacl_bootstrap_raw"
You can’t perform that action at this time.
0 commit comments