This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Using object lists for libf2c overflows command line length on AIX.
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Toon Moene <toon at moene dot indiv dot nluug dot nl>, gcc-patches at gcc dot gnu dot org
- Date: 31 Dec 2001 15:56:51 -0200
- Subject: Re: Using object lists for libf2c overflows command line length on AIX.
- Organization: GCC Team, Red Hat
- References: <200112311603.LAA29424@makai.watson.ibm.com>
On Dec 31, 2001, David Edelsohn <dje@watson.ibm.com> wrote:
[snip long command-line]
David told me in private that the auto-detected command-line limit was
12kb+, and that the command he posted wasn't really failing, but he
complained because it looked as if libtool wouldn't split the command
line, leading to the same kind of failure that occurred before. So
let me explain why the way I implemented it doesn't fail like the
original implementation would.
Originally, we'd explicitly list all object files in the makefile
command-line, when we called libtool to do the linking. This means
that make would attempt to run a shell to run the libtool script
passing a command-line that was too long. So it failed even before
libtool had a chance to attempt to split the command line.
With the implementation I've checked in, make passes libtool filenames
that *contain* lists of object files, so this command-line is much
shorter, and it doesn't exceed command-line length limits. Libtool
reads those files and creates command lines that list the object files
contained in them without exceeding command-line length limits, using
ld -r as many times as needed to accomplish that. Thus, it doesn't
fall prey of the same problem that occurred before, and I claim the
patch is safe unless someone actually demonstrates a real failure.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me