This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] add -foverride-comp-dir
Mark Mitchell wrote:
Dan Aloni wrote:
__FILE__ evaluates to whatever you provide in the command-line as the
name of the .c file, and in almost every case it's a relative
pathname. So, we don't have a problem there.
It's not always a relative pathname -- and inside header files it
evaluates to the name of the header, which is often an absolute path.
I've noticed that if you pass a relative pathname to -I you also end up
with relative pathnames for the headers you use in the processor output,
debug information and in __FILE__. Of course, you can't expect this for
headers under /usr/include, but at least a package's builtin-headers
would be relative if -I is used properly.
--
Dan Aloni, Linux specialist
XIV LTD, http://www.xivstorage.com
da-x@monatomic.org, da-x@colinux.org, da-x@gmx.net, dan@xiv.co.il