[patch] Broken script in gcc/Makefile.in
Paul Brook
paul@codesourcery.com
Wed May 19 17:52:00 GMT 2004
On Wednesday 19 May 2004 18:12, Daniel Jacobowitz wrote:
> On Wed, May 19, 2004 at 05:25:40PM +0100, Paul Brook wrote:
> > The makefile segments for {AR,RANLIB,NM}_FOR_TARGET in gcc/Makefile.in
> > are broken. They contain the line
> >
> > t='$(program_transform_name)'; echo nm | sed -e $$t ;
> >
> > which expands to t='s,^,arm-none-elf-,;'; echo ar | sed -e ;
> >
> > This code is only executed when running make inside gcc/ as AR_FOR_TARGET
> > is overridden by the toplevel makefile.
> >
> > The patch below fixes this by avoiding the use of t.
> >
> > Tested with cross from i686-linux to arm-none-elf.
> > Ok?
>
> I'm feeling dense today. How does the one expand to the other? It
> should expand to: t='s,^,arm-none-elf-,;'; echo ar | sed -e $t ;
>
> (Though I think the new form is nicer anyway.)
I don't know enough about the inticacies of makefiles to tell if it's a bug or
a feature (I'm using GNU make 3.8.0).
That line is inside backtics ( ` ) as an assignment, not as part of a makefile
rule. I'm guessing this causes an extra variable expansion pass somewhere.
Replacing $$t with $$$$t gives the correct result.
Paul
More information about the Gcc-patches
mailing list