@@ -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 )
0 commit comments