[ccache] [PATCH] enable CCACHE_UNIFY in debug mode

Chris Swiedler cswiedler at perpetual.com
Thu Jan 5 21:13:02 GMT 2006

Attached are some patches to ccache to help support CCACHE_UNIFY in
debug mode. 

The -unify patch has the primary change for this, which is to include
newlines in the unified source (the input to the hash) when they are
encountered in the source file. This makes the unified hash sensitive to
newline changes, which (AFAICT) removes the problem with compiler
warnings being reported on incorrect lines if the file was found in
cache and newlines have been added/removed from the source file (by
making the unified hash sensitive to newlines and therefore causing a
cache miss). This patch also removes the check which turns off the
unifier if -g (debug mode) is specified to the compiler.

The -hashdebug patch is a debugging change which saves the input to the
hash functions in a temporary file in the ccache dir if
CCACHE_HASH_DEBUG is set in the environment. This is helpful for
determining the cause of cache misses.

The -all patch contains both of these, plus an integration of Steve's
-relinc patch which changes include patchs to be relative if
CCACHE_RELINC is set in the environment.

Comments appreciated. 


More information about the ccache mailing list