-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
android: Support 16K page sizes. (#506)
As of Android 15, devices will be able to ship with 16 KB page sizes instead of the previous default of 4 KB. This requires updating the NDK (which we are not doing as to keep compatibility with API level 16 for 2.93c) or adjusting the build process of all shared libraries (which is done by this commit).
- Loading branch information
1 parent
1450f6b
commit b8e05d1
Showing
5 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ LIBOGG_VERSION ?= 1.3.5 | |
LIBVORBIS_VERSION ?= 1.3.7 | ||
WGET ?= wget | ||
TAR ?= tar | ||
PATCH ?= patch | ||
|
||
DEPS := arch/android/deps | ||
DEPS_BUILD := arch/android/deps/.build | ||
|
@@ -52,6 +53,7 @@ ${DEPS}/SDL2-${SDL_VERSION}: | ${DEPS} | |
${RM} -f [email protected] | ||
${WGET} https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz [email protected] | ||
${TAR} -xzf [email protected] -C ${DEPS}/ | ||
${PATCH} -i ../../SDL2-page-sizes.patch -p1 -d ${DEPS}/SDL2-${SDL_VERSION} | ||
|
||
${DEPS}/libogg-${LIBOGG_VERSION}: | ${DEPS} | ||
$(if ${V},,@echo " WGET " $@) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
diff -Nrup SDL2-2.30.9.orig/Android.mk SDL2-2.30.9/Android.mk | ||
--- SDL2-2.30.9.orig/Android.mk 2023-06-04 08:55:56.000000000 +0200 | ||
+++ SDL2-2.30.9/Android.mk 2024-12-01 10:07:36.795771235 +0100 | ||
@@ -83,6 +83,9 @@ LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv | ||
|
||
LOCAL_LDFLAGS := -Wl,--no-undefined | ||
|
||
+# https://developer.android.com/guide/practices/page-sizes | ||
+LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384" | ||
+ | ||
ifeq ($(NDK_DEBUG),1) | ||
cmd-strip := | ||
endif | ||
@@ -104,7 +107,8 @@ LOCAL_MODULE_FILENAME := libSDL2 | ||
|
||
LOCAL_LDLIBS := | ||
|
||
-LOCAL_LDFLAGS := | ||
+# https://developer.android.com/guide/practices/page-sizes | ||
+LOCAL_LDFLAGS := "-Wl,-z,max-page-size=16384" | ||
|
||
LOCAL_EXPORT_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters