Skip to content

Commit c7e187f

Browse files
committed
scons: build arm sel_ldr and nacl_helper_bootstrap with 16K page size
1 parent 2513fa8 commit c7e187f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

SConstruct

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,6 +2481,11 @@ def which(cmd, paths=os.environ.get('PATH', '').split(os.pathsep)):
24812481

24822482

24832483
def SetUpLinuxEnvArm(env):
2484+
if env.Bit('build_arm'):
2485+
max_page_size='0x10000'
2486+
else:
2487+
max_page_size='0x1000'
2488+
24842489
jail = env.GetToolchainDir(toolchain_name='arm_trusted')
24852490
if not platform.machine().startswith('arm'):
24862491
# Allow emulation on non-ARM hosts.
@@ -2513,11 +2518,17 @@ def SetUpLinuxEnvArm(env):
25132518
LD='arm-linux-gnueabihf-ld')
25142519
env.Prepend(CCFLAGS=['-march=armv7-a','-mfloat-abi=hard',
25152520
'-mtune=generic-armv7-a', '-mfpu=neon'])
2521+
env.Append(CCFLAGS=['-Wl,-z,max-page-size=' + max_page_size])
25162522

25172523
# get_plugin_dirname.cc has a dependency on dladdr
25182524
env.Append(LIBS=['dl'])
25192525

25202526
def SetUpAndroidEnv(env):
2527+
if env.Bit('build_arm'):
2528+
max_page_size='0x10000'
2529+
else:
2530+
max_page_size='0x1000'
2531+
25212532
env.FilterOut(CPPDEFINES=[['_LARGEFILE64_SOURCE', '1']])
25222533
android_ndk_root = os.path.join('${SOURCE_ROOT}', 'third_party',
25232534
'android_ndk')
@@ -2614,6 +2625,7 @@ def SetUpAndroidEnv(env):
26142625
'-D__ANDROID__',
26152626
# Due to bogus warnings on uintptr_t formats.
26162627
'-Wno-format',
2628+
'-Wl,-z,max-page-size=' + max_page_size,
26172629
] + arch_cflags,
26182630
CXXFLAGS=['-I%s' % android_stlport_include,
26192631
'-I%s' % android_ndk_include,

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)