Determine the page size on Android from NDK header files

The definition of the PAGE_SIZE macro is used as a signal for a 32-bit
target or a 64-bit target with an older NDK.  Otherwise, a 16KiB page
size is assumed.

Closes: #2657
This commit is contained in:
Carl Shapiro 2026-01-20 18:56:32 -08:00 committed by Guangli Dai
parent 5f353dc283
commit c51abba131

View file

@ -1990,6 +1990,11 @@ case "${host}" in
LG_PAGE=14
fi
;;
*-*-linux-android)
if test "x$LG_PAGE" = "xdetect"; then
AC_CHECK_DECLS([PAGE_SIZE], [LG_PAGE=12], [LG_PAGE=14], [#include <sys/user.h>])
fi
;;
aarch64-unknown-linux-*)
if test "x$LG_PAGE" = "xdetect"; then
LG_PAGE=16