[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MLB] Fix for arg list too long (Finally a patch!)
From: |
Alexandre Oliva |
Subject: |
Re: [MLB] Fix for arg list too long (Finally a patch!) |
Date: |
15 Feb 2001 02:02:59 -0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) |
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.
> + 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 ...\"
^
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer address@hidden, redhat.com}
CS PhD student at IC-Unicamp address@hidden, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
- [MLB] Fix for arg list too long (Finally a patch!), Robert Boehne, 2001/02/13
- Re: [MLB] Fix for arg list too long (Finally a patch!),
Alexandre Oliva <=
- Re: [MLB] Fix for arg list too long (Finally a patch!), Robert Boehne, 2001/02/15
- Re: [MLB] Fix for arg list too long (Finally a patch!), Alexandre Oliva, 2001/02/15
- Re: [MLB] Fix for arg list too long (another attempt), Robert Boehne, 2001/02/19
- Re: [MLB] Fix for arg list too long (another attempt), Alexandre Oliva, 2001/02/20
- Re: [MLB] Fix for arg list too long (another [final?] attempt), Robert Boehne, 2001/02/20
- Re: [MLB] Fix for arg list too long (another [final?] attempt), Alexandre Oliva, 2001/02/22
- Re: [MLB] Fix for arg list too long (another final! attempt), Robert Boehne, 2001/02/22
- Re: [MLB] Fix for arg list too long (another final! attempt), Alexandre Oliva, 2001/02/23