Bogus usage of gcc --print-file

Greg Schafer gschafer at
Tue Aug 16 19:02:17 PDT 2005

Matthew Burgess wrote:

> Greg Schafer wrote:
>> The documented switch is:
>>   -print-file-name=
>> However, the docs say it is only for "library", but it appears to work for
>> any file or dir within GCC's private dir eg: specs, startfiles,
> Doesn't appear to do what we need it to do though.  In as much as if the 
> specs file isn't there (which it isn't under gcc-4.x), it doesn't report 
> it.

Correct. `-print-file-name=' is a search mechanism. If the specs file
doesn't exist yet, there is nothing to search for :-(

> I suppose the idea here is to use `dirname' on it, right?

That should work. There are many ways to skin a cat :-/

> Do I get extra marks for showing my working? :)

Go to the top of the class :-)


More information about the lfs-dev mailing list