From aecb4723c92fc567e3184c8620f603532a6fea09 Mon Sep 17 00:00:00 2001 From: inkeliz Date: Tue, 27 May 2025 04:17:42 +0100 Subject: [PATCH] gogio: [Android] support 16kB page sizes, required for Android 15+ Previously, Gio crashes on 16KB page-size enable version of Android 15. Also, Google Play will require 16KB compatible apps by November 2025. This patch changes the page-size of C/CGO to 64KB, which is compatible with 4KB, 16KB and 64KB. That is also the same value used by Golang Compiler itself. Signed-off-by: inkeliz Signed-off-by: Elias Naur --- gogio/androidbuild.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gogio/androidbuild.go b/gogio/androidbuild.go index 37fa059..f6dc924 100644 --- a/gogio/androidbuild.go +++ b/gogio/androidbuild.go @@ -217,7 +217,7 @@ func compileAndroid(tmpDir string, tools *androidTools, bi *buildInfo) (err erro cmd := exec.Command( "go", "build", - "-ldflags=-w -s "+bi.ldflags, + "-ldflags=-w -s -extldflags \"-Wl,-z,max-page-size=65536\" "+bi.ldflags, "-buildmode=c-shared", "-tags", bi.tags, "-o", libFile,