From 4ed91da65eb9b5b8ddf1e19546ba94b3e6ad896f Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 7 Aug 2025 11:29:59 -0700
Subject: [PATCH] Revert "android: support Google Play 16 kiB page size
requirement"
This reverts commit 7ebec86ae0c6fe2038f00b652486811fa0509c05.
If you need to support the Google Play 16 kiB page size requirement, the recommendation is to use NDK r28c or newer, which automatically aligns binaries correctly.
---
Android.mk | 4 ----
CMakeLists.txt | 2 --
cmake/PrivateSdlFunctions.cmake | 7 -------
test/CMakeLists.txt | 1 -
4 files changed, 14 deletions(-)
diff --git a/Android.mk b/Android.mk
index 4788fade..3202d18f 100644
--- a/Android.mk
+++ b/Android.mk
@@ -159,10 +159,6 @@ endif
LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH)/include
-# https://developer.android.com/guide/practices/page-sizes
-LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384"
-LOCAL_LDFLAGS += "-Wl,-z,common-page-size=16384"
-
include $(BUILD_SHARED_LIBRARY)
###########################
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75f51e82..9aa0613d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -262,7 +262,6 @@ if(SDLMIXER_BUILD_SHARED_LIBS)
target_link_libraries(${sdl3_mixer_target_name} PRIVATE SDL3::SDL3-shared)
endif()
sdl_add_warning_options(${sdl3_mixer_target_name} WARNING_AS_ERROR ${SDLMIXER_WERROR})
-sdl_add_platform_link_options(${sdl3_mixer_target_name})
if(WIN32 AND BUILD_SHARED_LIBS)
target_sources(${sdl3_mixer_target_name} PRIVATE
src/version.rc
@@ -1141,7 +1140,6 @@ if(SDLMIXER_SAMPLES)
target_compile_features(${TARGET} PRIVATE c_std_99)
endif()
sdl_add_warning_options(${TARGET} WARNING_AS_ERROR ${SDLMIXER_WERROR})
- sdl_add_platform_link_options(${TARGET})
sdl_target_link_options_no_undefined(${TARGET})
target_link_libraries(${TARGET} PRIVATE SDL3::SDL3_test)
target_link_libraries(${TARGET} PRIVATE SDL3_mixer::${sdl3_mixer_target_name})
diff --git a/cmake/PrivateSdlFunctions.cmake b/cmake/PrivateSdlFunctions.cmake
index 1e93f8ac..47e6f4e4 100644
--- a/cmake/PrivateSdlFunctions.cmake
+++ b/cmake/PrivateSdlFunctions.cmake
@@ -313,13 +313,6 @@ function(sdl_add_warning_options TARGET)
endif()
endfunction()
-function(sdl_add_platform_link_options TARGET)
- if(ANDROID)
- target_link_options(${TARGET} PRIVATE "-Wl,-z,max-page-size=16384")
- target_link_options(${TARGET} PRIVATE "-Wl,-z,common-page-size=16384")
- endif()
-endfunction()
-
function(sdl_no_deprecated_errors TARGET)
check_c_compiler_flag(-Wno-error=deprecated-declarations HAVE_WNO_ERROR_DEPRECATED_DECLARATIONS)
if(HAVE_WNO_ERROR_DEPRECATED_DECLARATIONS)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 64e863c0..306fa530 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -15,7 +15,6 @@ function(add_sdl_mixer_test_executable TARGET)
$<TARGET_PROPERTY:${sdl3_mixer_target_name},COMPILE_DEFINITIONS>
)
sdl_add_warning_options(${TARGET} WARNING_AS_ERROR ${SDLMIXER_WERROR})
- sdl_add_platform_link_options(${TARGET})
target_link_libraries(${TARGET} PRIVATE SDL3_mixer::SDL3_mixer SDL3::SDL3)
if(SDLMIXER_TESTS_INSTALL)