[PATCH 2/2] Add gcc-ar, gcc-ranlib, gcc-ld wrappers

Andi Kleen andi@firstfloor.org
Fri Oct 29 15:07:00 GMT 2010


On Fri, Oct 29, 2010 at 04:03:28PM +0200, Andreas Schwab wrote:
> Andi Kleen <ak@linux.intel.com> writes:
> 
> > On Fri, Oct 29, 2010 at 01:31:31PM +0000, Joseph S. Myers wrote:
> >> On Fri, 29 Oct 2010, Andi Kleen wrote:
> >> > +if test "x$R" != "x" ; then
> >> > +	# work around gold bug, -r and -fuse-linker-plugin
> >> > +	# do not interact well. It's not needed anyways.
> >> > +	# the gold bug has been fixed, but still keep this.
> >> > +	ARGS=`echo $ARGS | sed -e s/-fuse-linker-plugin//`
> >> 
> >> Apart from the issues with spaces, echo will process some options on some 
> >> systems and this sed command will happily modify option arguments that 
> >> happen to contain that particular string.  As before, (POSIX) shell is not 
> >> a good language in which to do this robustly (if you e.g. assume various 
> >> bash features, it becomes easier).
> >
> > Are these systems with funny echo supported by LTO?
> 
> You can do that without echo.

How?  I was originally using bash ${../.../..}  but I was worried
that this wasn't portable enough, so i ended up with echo | sed instead.

-Andi



More information about the Gcc-patches mailing list