[PATCH] Re: ld testsuite breaks with latest GCC-4.0

Jakub Jelinek jakub@redhat.com
Tue Jan 4 10:43:00 GMT 2005


On Sun, Jan 02, 2005 at 05:24:00PM +1100, Greg Schafer wrote:

> 2005-01-02  Greg Schafer  <gschafer@zip.com.au>
> 
> 	* configure.host: Use "${CC} -dumpspecs" instead of
> 	"${CC} --print-file-name=specs" to appease GCC versions >= 4.0.

If there is a specs file, configure.host should use that and only use
-dumpspecs if it is not present.
-dumpspecs dumps the built-in specs, not the ones it finds on the
filesystem.
This can make a difference if specs is hand edited.

So, I think the patch should use ${CC} --print-file-name=specs,
if that prints just specs, it should use ${CC} -dumpspecs,
otherwise cat the specs file.
  specs=`${CC} --print-file-name=specs`
  { if [ x"$specs" = xspecs ]; then ${CC} -dumpspecs; else cat "$specs"; fi; } \
  | egrep ...

	Jakub



More information about the Binutils mailing list