[Top][All Lists]

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

Re: Fix for Arg list too long

From: Alexandre Oliva
Subject: Re: Fix for Arg list too long
Date: 12 Dec 2000 22:42:41 -0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

On Dec 12, 2000, Robert Boehne <address@hidden> wrote:

> Right now, $incr_archive_cmds will first create an archive file one .o
> at a time,
> then link a shared object with the archive file in place of $libobjs.
> This works

Not portably, I'm afraid.  Besides broken systems in which static
libraries just can't be linked into shared libraries, there's also the
issue of forcing the shared library to import *all* symbols from the
object files.

That's why I had suggested the reload_flag approach: instead of
creating archives, you'd be creating new object files out of multiple

> Ah, yes, I hadn't thought about that, I'll incorporate your suggestion.
> Sill I wonder what file to put it in, seems to be the best
> option.

libtool.m4 is probably a better idea.  Of course, in the
multi-language branch, you'd have to figure out some way to get this
value to ltconfig, but ltconfig no longer exists in mainline, anyway.
And the good thing about using libtool.m4 is that all autoconf macros
will be available.

> Also, in reading the GNU Coding Standards, the list of unix commands
> that are allowable does not include "wc".  I can't help but use it,
> or somthing else not in the list.  Will this be a problem?  Should
> we ammend the list?

Nope.  If it's not there, it's not portable.  You can test whether
it's available, and, if it's not, fallback to the expr solution.  But
even this may fail, so, in desperation mode, you may have to fallback
to something like:

onedotperchar=`echo $cmd | sed 's,.,. ,g'
length=`set $onedotperchar; echo $#`

Or use `awk':

length=`echo cmd | awk '{print length($0);}'`

(I'm not 100% sure length() is in the portable subset of awk, though)

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  address@hidden,}
CS PhD student at IC-Unicamp        address@hidden,}
Free Software Evangelist    *Please* write to mailing lists, not to me

reply via email to

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