Bogus usage of gcc --print-file

Matthew Burgess matthew at
Tue Aug 16 14:44:32 PDT 2005

Matthew Burgess wrote:

> # echo `dirname $(gcc -print-file-name=libgcc.a)`/specs

That can actually be shortened down to:

SPECFILE=`dirname $(gcc -print-libgcc-file-name)`/specs

That's 20 characters less to type (compared to the current command in 
gcc4), and a much simpler command too.  The only question that remains 
is: Is the 'specs' file guaranteed to be searched for in the same dir as 

I guess it's no less brittle than the current command which expects it 
to be found in the 'install' path and that the 'install' path will be 
reported first by '-print-search-dirs'.

If I hear no objections to the above, I'll commit the changes tomorrow 


More information about the lfs-dev mailing list