[ccache] stat() versus gcc -v in the hash

M. Creidieki Crouch creidieki at gmail.com
Mon Jul 19 08:11:34 GMT 2004


Hi,

I've been using ccache with my Gentoo system, and it's working really
well.  The only problem I'm having is that whenever I recompile my
system ("emerge --emptytree world"), the mtime of my compiler changes,
and none of my cache seems to work, even if the compiler is the same
version and was compiled with the same options.

I looked through the code, and noticed that the date and size of the
compiler are added to the hash.  Would it be possible to hash the
output of "gcc -v" (or equivalent) instead?  I think that would make
the detection of whether the compiler has changed more accurate, but
I'm not sure.  I'd be happy to write a patch if it sounds like it
would work.

Thanks,

M. Creidieki Crouch


More information about the ccache mailing list