This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] build failure, gcc 3.0, native hppa2.0w-hp-hpux11.00, ltconfig
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] build failure, gcc 3.0, native hppa2.0w-hp-hpux11.00, ltconfig
- From: Michael Elizabeth Chastain <chastain at cygnus dot com>
- Date: Fri, 29 Jun 2001 22:50:37 -0700
This patch fixes a build failure in native hppa2.0w-hp-hpux11.00
on gcc-3_0-branch, including the gcc 3.0 release. This build failure
is a regression versus 2.95.3.
The build failure was originally reported in:
"Configure error-GCC-3 (CVS source for 6/5/2001) on HPUX 11.0:
ltconfig and maximum length of command line operations in zlib"
http://gcc.gnu.org/ml/gcc-bugs/2001-06/msg00126.html
ltconfig has some code that finds the maximum length of command line
arguments by passing larger and larger arguments to $CONFIG_SHELL,
until either the command fails or a limit of 1 megabyte is reached.
I'm getting this error:
finding the maximum length of command line arguments... /horton/chastain/baseline/ORIG-gcc-3.0/zlib/../ltconfig[790]: There is not enough memory available now.
configure: error: libtool configure failed
Configure in /behemoth/mothra/chastain/x3/zlib failed, exiting.
My machine is:
HP-UX behemoth B.11.00 U 9000/800 2003254751 unlimited-user license
The patch is simple: I reduce the upper limit from 1 megabyte
to 512K. I wanted to make it 640K for esthetic reasons ("640k should be
enough for anybody"), but it's most convenient to be a power of 2.
I tested the actual argument size on several platforms before and
after the patch.
before after
------ -----
native hppa1.1-hp-hpux10.20 12289 12289
native hppa1.1-hp-hpux11.00 abort 393217
native i686-pc-linux-gnu 49153 49153
native sparc-sun-solaris2.5.1 1537 1537
native sparc-sun-solaris2.6 393217 393217
native sparc-sun-solaris2.7 393217 393217
native sparc-sun-solaris2.8 393217 393217
Is this patch acceptable?
If so, can someone with commit access commit it for me?
Michael Elizabeth Chastain
<chastain@redhat.com>
"love without fear"
===
2001-06-29 Michael Chastain <chastain@redhat.com>
* ltconfig: Reduce limit on lt_cv_sys_max_cmd_len from 1 megabyte
to 512 kilobytes.
Index: ltconfig
===================================================================
RCS file: /cvs/cvsfiles/devo/ltconfig,v
retrieving revision 1.32
diff -c -3 -p -r1.32 ltconfig
*** ltconfig 2001/06/04 17:09:06 1.32
--- ltconfig 2001/06/30 04:52:56
*************** else
*** 787,797 ****
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
# we can't tell.
while test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
= "XX$testring" &&
new_result=`expr "X$testring" : ".*" 2>&1` &&
lt_cv_sys_max_cmd_len=$new_result &&
! test $i != 18 # 1 MB should be enough
do
i=`expr $i + 1`
testring=$testring$testring
--- 787,800 ----
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
# we can't tell.
+ #
+ # If we get as high as 512k just accept that. In particular,
+ # native hppa2.0w-hp-hpux11.00 has a problem if the limit is 1m.
while test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
= "XX$testring" &&
new_result=`expr "X$testring" : ".*" 2>&1` &&
lt_cv_sys_max_cmd_len=$new_result &&
! test $i != 17 # 512k should be enough
do
i=`expr $i + 1`
testring=$testring$testring