Patch: Override auto-guessed max cmd line length in MingW

Mohan Embar gnustuff@thisiscool.com
Sat Mar 8 05:33:00 GMT 2003


Hi Patch Folks,

This patch is another piece needed for a self-hosted
build of GCC/GCJ 3.3 under MingW GCC 3.2. For some reason,
the maximum command line length guessed by ltconfig for MSYS
(the Win32 bash shell port) on Win32 is almost 400K, which
is way too much for ar to handle. This overrides the
auto-guessed value to 30000, a number Ranjit previously
came up with.

Is this the correct way to do this?

Enjoy.

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/

ChangeLog
2003-03-07  Mohan Embar  <gnustuff@thisiscool.com>

	* ltcf-c.sh: force maximum command line length for mingw
	* ltcf-cxx.sh: idem
	* ltcf-gcj.sh: idem

Index: ltcf-c.sh
===================================================================
RCS file: /cvsroot/gcc/gcc/ltcf-c.sh,v
retrieving revision 1.17
diff -u -2 -r1.17 ltcf-c.sh
--- ltcf-c.sh	14 Aug 2002 02:39:52 -0000	1.17
+++ ltcf-c.sh	5 Mar 2003 06:30:34 -0000
@@ -823,2 +823,10 @@
 fi
 ac_cv_archive_cmds_needs_lc=$need_lc
+
+# This compensates for the fact that ltconfig chooses too high a length
+# for the command line.
+case $host_os in
+	mingw*)
+	lt_cv_sys_max_cmd_len=30000
+	;;
+esac
Index: ltcf-cxx.sh
===================================================================
RCS file: /cvsroot/gcc/gcc/ltcf-cxx.sh,v
retrieving revision 1.23.14.2
diff -u -2 -r1.23.14.2 ltcf-cxx.sh
--- ltcf-cxx.sh	20 Feb 2003 01:12:47 -0000	1.23.14.2
+++ ltcf-cxx.sh	5 Mar 2003 06:30:36 -0000
@@ -1020,2 +1020,10 @@
 *) need_lc=yes ;;
 esac
+
+# This compensates for the fact that ltconfig chooses too high a length
+# for the command line.
+case $host_os in
+	mingw*)
+	lt_cv_sys_max_cmd_len=30000
+	;;
+esac
Index: ltcf-gcj.sh
===================================================================
RCS file: /cvsroot/gcc/gcc/ltcf-gcj.sh,v
retrieving revision 1.10.42.1
diff -u -2 -r1.10.42.1 ltcf-gcj.sh
--- ltcf-gcj.sh	20 Feb 2003 00:36:49 -0000	1.10.42.1
+++ ltcf-gcj.sh	5 Mar 2003 06:30:39 -0000
@@ -650,2 +650,10 @@
 # All existing releases of GCJ support `-c -o'.
 lt_cv_compiler_c_o=yes
+
+# This compensates for the fact that ltconfig chooses too high a length
+# for the command line.
+case $host_os in
+	mingw*)
+	lt_cv_sys_max_cmd_len=30000
+	;;
+esac






More information about the Java-patches mailing list