From 7ae0f15c598258610dd3cfd9633301ffa8661c45 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Mon, 21 Mar 2022 12:15:16 -0700 Subject: [PATCH] Add a default page size when cross-compile for Apple M1. When cross-compile for M1 and no page size specified, use the default 16K and skip detecting the page size (which is likely incorrect). --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index 69b8162f..5c7a8ef8 100644 --- a/configure.ac +++ b/configure.ac @@ -1677,6 +1677,15 @@ fi AC_ARG_WITH([lg_page], [AS_HELP_STRING([--with-lg-page=], [Base 2 log of system page size])], [LG_PAGE="$with_lg_page"], [LG_PAGE="detect"]) +case "${host}" in + aarch64-apple-darwin*) + dnl When cross-compile for Apple M1 and no page size specified, use the + dnl default and skip detecting the page size (which is likely incorrect). + if test "x${host}" != "x${build}" -a "x$LG_PAGE" = "xdetect"; then + LG_PAGE=14 + fi + ;; +esac if test "x$LG_PAGE" = "xdetect"; then AC_CACHE_CHECK([LG_PAGE], [je_cv_lg_page],