[ccache] ccache and -g
cswiedler at perpetual.com
Tue Jan 3 19:15:41 GMT 2006
Is there any way to get ccache to work well with the -g option to gcc,
which embeds the absolute path of the source file in the preprocessed
output? I would like to be able to build the same file (and options,
etc) in different locations and have ccache see them as identical files.
This will cause gdb to sometimes think the source files come from a
different location, but I'm okay with this since the files will be
Looking at the preprocessor output (with -g enabled) from two identical
files in different trees, the only difference is the second line which
contains the path of the source file. This line doesn't appear at all if
-g is not enabled. If I modified ccache to exclude this line from the
hash, would this have strange consequences?
More information about the ccache