From d2694fc37d6a414fc7c7a2a88730dc79d91751d9 Mon Sep 17 00:00:00 2001 From: Saud Khan Date: Wed, 11 Sep 2024 22:04:43 +0800 Subject: [PATCH] Add support for Android's new 16K page sizes (#1407) --- dist-build/android-armv7-a.sh | 1 + dist-build/android-armv8-a.sh | 1 + dist-build/android-x86.sh | 1 + dist-build/android-x86_64.sh | 1 + 4 files changed, 4 insertions(+) diff --git a/dist-build/android-armv7-a.sh b/dist-build/android-armv7-a.sh index 6cfa80ae..84e7671a 100755 --- a/dist-build/android-armv7-a.sh +++ b/dist-build/android-armv7-a.sh @@ -1,4 +1,5 @@ #!/bin/sh export TARGET_ARCH=armv7-a export CFLAGS="-Os -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -marm -march=${TARGET_ARCH}" +export LDFLAGS="-Wl,-z,max-page-size=16384" ARCH=arm HOST_COMPILER=armv7a-linux-androideabi "$(dirname "$0")/android-build.sh" diff --git a/dist-build/android-armv8-a.sh b/dist-build/android-armv8-a.sh index 16299828..5fa930c6 100755 --- a/dist-build/android-armv8-a.sh +++ b/dist-build/android-armv8-a.sh @@ -1,4 +1,5 @@ #!/bin/sh export TARGET_ARCH=armv8-a+crypto export CFLAGS="-Os -march=${TARGET_ARCH}" +export LDFLAGS="-Wl,-z,max-page-size=16384" NDK_PLATFORM=android-21 ARCH=arm64 HOST_COMPILER=aarch64-linux-android "$(dirname "$0")/android-build.sh" diff --git a/dist-build/android-x86.sh b/dist-build/android-x86.sh index f21fe472..d01b045c 100755 --- a/dist-build/android-x86.sh +++ b/dist-build/android-x86.sh @@ -1,4 +1,5 @@ #!/bin/sh export TARGET_ARCH=i686 export CFLAGS="-Os -march=${TARGET_ARCH}" +export LDFLAGS="-Wl,-z,max-page-size=16384" ARCH=x86 HOST_COMPILER=i686-linux-android "$(dirname "$0")/android-build.sh" diff --git a/dist-build/android-x86_64.sh b/dist-build/android-x86_64.sh index 9f2b4f0a..25f44348 100755 --- a/dist-build/android-x86_64.sh +++ b/dist-build/android-x86_64.sh @@ -1,4 +1,5 @@ #!/bin/sh export TARGET_ARCH=westmere export CFLAGS="-Os -march=${TARGET_ARCH}" +export LDFLAGS="-Wl,-z,max-page-size=16384" NDK_PLATFORM=android-21 ARCH=x86_64 HOST_COMPILER=x86_64-linux-android "$(dirname "$0")/android-build.sh"