[ccache] ccache and -g
Martin Pool
mbp at sourcefrog.net
Tue Jan 3 22:37:17 GMT 2006
On 3 Jan 2006, Chris Swiedler <cswiedler at perpetual.com> wrote:
> 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
> identical anyway.
>
> 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?
I think that would be fine. There are already options that do similar
things (e.g. CCACHE_UNIFY). Please post the patch if you do this
change.
--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/ccache/attachments/20060104/9a48d009/attachment.bin
More information about the ccache
mailing list