[ccache] ccache and -g
steveb at snapgear.com
Tue Jan 3 23:22:11 GMT 2006
You may want to look at my "relative include" patch (attached).
If you set CCACHE_RELINC, any absolute include paths are converted to relative
If you set CCACHE_UNIFY=force, the unified cache will work even if -g
Chris Swiedler 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?
> ccache mailing list
> ccache at lists.samba.org
More information about the ccache