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. I suppose the idea here is to use `dirname' on it, right?
# gcc -print-search-dirs | head -n 1 | awk '{ print $2 "specs" }'
/usr/lib/gcc/i686-pc-linux-gnu/4.0.1/specs
# gcc -print-file-name=libgcc.a
/usr/lib/gcc/i686-pc-linux-gnu/4.0.1/libgcc.a
# gcc -print-file-name=specs
specs
# echo `dirname $(gcc -print-file-name=libgcc.a)`/specs
/usr/lib/gcc/i686-pc-linux-gnu/4.0.1/specs
Do I get extra marks for showing my working? :)
Regards,
Matt.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page