aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep Dhavale <dhavale@google.com>2023-10-05 15:40:08 -0700
committerGao Xiang <hsiangkao@linux.alibaba.com>2023-10-08 07:36:28 +0800
commit8ee07437322862dbe631f04e817d8c371fd28ec6 (patch)
treee199e95836b369ce7963e5ddea40acbe2bf8052b
parentce36273833096f1b7e828309d9b1caa37132092d (diff)
downloaderofs-utils-8ee07437322862dbe631f04e817d8c371fd28ec6.tar.gz
erofs-utils: Fix cross compile with autoconf
AC_RUN_IFELSE expects the action if cross compiling. If not provided cross compilation fails with error "configure: error: cannot run test program while cross compiling". Use 4096 as the buest guess PAGESIZE if cross compiling as it is still the most common page size. Reported-in: https://lore.kernel.org/all/0101018aec71b531-0a354b1a-0b70-47a1-8efc-fea8c439304c-000000@us-west-2.amazonses.com/ Fixes: 8ee2e591dfd6 ("erofs-utils: support detecting maximum block size") Signed-off-by: Sandeep Dhavale <dhavale@google.com> Link: https://lore.kernel.org/r/20231005224008.817830-1-dhavale@google.com Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
-rw-r--r--configure.ac4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 13ee616..a546310 100644
--- a/configure.ac
+++ b/configure.ac
@@ -284,8 +284,8 @@ AS_IF([test "x$MAX_BLOCK_SIZE" = "x"], [
return 0;
]])],
[erofs_cv_max_block_size=`cat conftest.out`],
- [],
- []))
+ [erofs_cv_max_block_size=4096],
+ [erofs_cv_max_block_size=4096]))
], [erofs_cv_max_block_size=$MAX_BLOCK_SIZE])
# Configure debug mode