Skip to content

Commit 1ecb413

Browse files
committed
scons: build arm sel_ldr and nacl_helper_bootstrap with 16K page size
1 parent 34a3427 commit 1ecb413

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

SConstruct

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,6 +2513,7 @@ def SetUpLinuxEnvArm(env):
25132513
LD='arm-linux-gnueabihf-ld')
25142514
env.Prepend(CCFLAGS=['-march=armv7-a','-mfloat-abi=hard',
25152515
'-mtune=generic-armv7-a', '-mfpu=neon'])
2516+
env.Append(CCFLAGS=['-Wl,-z,max-page-size=${MAX_PAGE_SIZE}'])
25162517

25172518
# get_plugin_dirname.cc has a dependency on dladdr
25182519
env.Append(LIBS=['dl'])
@@ -2614,6 +2615,7 @@ def SetUpAndroidEnv(env):
26142615
'-D__ANDROID__',
26152616
# Due to bogus warnings on uintptr_t formats.
26162617
'-Wno-format',
2618+
'-Wl,-z,max-page-size=${MAX_PAGE_SIZE}',
26172619
] + arch_cflags,
26182620
CXXFLAGS=['-I%s' % android_stlport_include,
26192621
'-I%s' % android_ndk_include,
@@ -2688,6 +2690,8 @@ def MakeGenericLinuxEnv(platform=None):
26882690
LINK = '$CXX',
26892691
)
26902692

2693+
linux_env.SetDefault(MAX_PAGE_SIZE='0x1000')
2694+
26912695
# Prepend so we can disable warnings via Append
26922696
linux_env.Prepend(
26932697
CPPDEFINES = [['_POSIX_C_SOURCE', '199506'],
@@ -2710,6 +2714,7 @@ def MakeGenericLinuxEnv(platform=None):
27102714
LINKFLAGS = ['-m64'] + sysroot_flags,
27112715
)
27122716
elif linux_env.Bit('build_arm'):
2717+
linux_env.Replace(MAX_PAGE_SIZE='0x10000')
27132718
SetUpLinuxEnvArm(linux_env)
27142719
elif linux_env.Bit('build_mips32'):
27152720
SetUpLinuxEnvMips(linux_env)

src/trusted/service_runtime/build.scons

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ if (env.Bit('linux') and not env.Bit('built_elsewhere')):
427427
'nacl_bootstrap_raw',
428428
[bootstrap_obj],
429429
("env CXX='${CXX}' ${PYTHON} %s %s " +
430-
'-m %s --build-id -static -z max-page-size=0x1000 ' +
430+
'-m %s --build-id -static -z max-page-size=${MAX_PAGE_SIZE} ' +
431431
'--defsym RESERVE_TOP=%s --script %s -o ${TARGET} ${SOURCES}') %
432432
(bootstrap_env.File('linux/ld_bfd.py'), compiler_override, ld_emul,
433433
reserve_top, bootstrap_env.File('linux/nacl_bootstrap.x')),

0 commit comments

Comments
 (0)