[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix for Arg list too long

From: Robert Boehne
Subject: Fix for Arg list too long
Date: Wed, 24 Jan 2001 18:24:52 -0600


I have a nice fix for the "Arg list too long" problem but
I need some advice on some parts of the code.

#1)  I have to check for the existence of 'wc -c' to check the
command line length.  The macro can be put into, but
then if a user doesn't put it there, it won't be used.  It would save
me having to move it and re-submit a patch if I knew where it should go.

#2)  I am checking the system header files to find the maximum command
line length.  Currently I have this in, but it really
only needs to be run once for each platform, not each tag.  Where should
it go?

#3) $LD is set to $CXX in most cases for C++ compilers, but $reload_cmds
not work in general unless $LD is set to 'ld'.  Currently I save the
of $LD, set it to "ld$exeext" and restore the value after the
have been evaluated.  Is there a better way to do this?  It doesn't seem
too nice to hard-code $LD="ld$exeext".

For those of you who are interested, here's how it works:
The command that will be used to create a library is expanded, then
the number of arguments is checked with 'wc -c'.  If the command
is longer than the maximum determined at tag creation time, a separate
block creates reloadable object files using $reload_cmds with
The number of reloadable object files is determined by counting the
number of objects in $libobjs to determine how many can be linked at
once to prevent exceeding the command length limit.  This solution
should have no side effects when it is not used becasue it will
execute as normal if the command line will fit.  It also requires
no porting as it is currently written, and is nearly as fast as it
can be.  A previous design linked objects one at a time, which increased
compile time by orders of magnitude.  Currently it has been tested on
IRIX and OSF1 with Open CASCADE (240Mb of C++ source in 44 shared
Testing will continue for Solaris, Linux, HPUX 10.20 & 11.0, and Cygwin
I can manage to find a PC with room.



Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]