libtool-patches
[Top][All Lists]
Advanced

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

Re: [MLB] Fix for arg list too long (Finally a patch!)


From: Robert Boehne
Subject: Re: [MLB] Fix for arg list too long (Finally a patch!)
Date: Thu, 15 Feb 2001 10:08:03 -0600

Alexandre Oliva wrote:
> 
> On Feb 13, 2001, Robert Boehne <address@hidden> wrote:
> 
> > +              output=$output_objdir/all_objs${k}.$objext
> 
> This won't work in parallel builds.  You must name the temporary
> object files after the output.

By named after, do you mean somthing like "all_objs$output" ?
Also, could you explain why this would break a paralell build?

> > +                eval concat_cmds=\"$concat_cmds~$reload_cmds $objlist 
> > $output_objdir/all_objs`expr $k - 1`.$objext\"
> 
> I have a feeling you may want to be over-using `eval' in some places,
> so that you end up getting some variables expanded multiple times.
> For example, concat_cmds has already had reload_cmds expanded once
> here, so you probably want to use \$concat_cmds here, so that it's
> expanded in the evalled command, but not when the command to be
> evaled is parsed.
> 
> Let me give an example.  If reload_cmds contains `$output', we do want
> to have $output expanded, so we use:
> 
> eval concat_cmds=\"$reload_cmds \$objlist\"
> 
> So that the command evaled is:
> 
> concat_cmds="$CC -r -o $output $objlist"
> 
> that gets us the correct result, i.e., something like:
> 
> "$concat_cmds" = "gcc -r -o foo.o x.o y.o"
> 
> But now think of an object file containing an odd character, such as a
> blank, a quote, a dollar sign, etc.  We *should* still work in this
> case, so we must make sure to not eval $concat_cmds again.
> 
> So we should probably use:
> 
> eval concat_cmds=\"\$concat_cmds~$reload_cmds ...\"
>                    ^

Ah, yes, I see.  I had taken the approach that I should eval more
rather than less, but I see that I need to eval _exactly_ the
right number of times.  I will add a test for this in the final
version.

-- 
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]