File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -6,5 +6,23 @@ AM_INIT_AUTOMAKE([-Wall -Werror dist-bzip2 foreign color-tests parallel-tests])
66AM_PROG_CC_C_O
77AC_PROG_CXX
88
9+ PAGESIZE=auto
10+ AC_ARG_WITH ( [ page-size] ,
11+ AS_HELP_STRING ( [ --with-page-size=SIZE] , [ Specify default pagesize (default auto)] ) ,
12+ PAGESIZE=$withval
13+ )
14+
15+ AS_IF ( [ test "x$PAGESIZE" = xauto] ,
16+ AS_IF ( [ which getconf &>/dev/null] , [
17+ PAGESIZE=`getconf PAGESIZE &>/dev/null || getconf PAGE_SIZE &>/dev/null`
18+ ] )
19+ AS_IF ( [ test "x$PAGESIZE" = x] , [
20+ PAGESIZE=4096
21+ ] )
22+ )
23+
24+ AC_DEFINE_UNQUOTED ( PAGESIZE , ${PAGESIZE} )
25+ AC_MSG_RESULT ( [ Setting page size to ${PAGESIZE}] )
26+
927AC_CONFIG_FILES ( [ Makefile src/Makefile tests/Makefile patchelf.spec] )
1028AC_OUTPUT
Original file line number Diff line number Diff line change @@ -40,13 +40,7 @@ unsigned char * contents = 0;
4040
4141
4242static unsigned int getPageSize (){
43- #ifdef MIPSEL
44- /* The lemote fuloong 2f kernel defconfig sets a page size of
45- 16KB. */
46- return 4096 * 4 ;
47- #else
48- return 4096 ;
49- #endif
43+ return PAGESIZE;
5044}
5145
5246
You can’t perform that action at this time.
0 commit comments