[ccache] sharing cache entries with and without distcc?

Assar assar at permabit.com
Mon Oct 17 12:38:49 GMT 2005


Is there (or should there be) a way to tell ccache to add a prefix
command that's not included in the hash key?

The problem that I'm looking at is running both ccache by itself and
in combination with distcc.  Currently, with ccache 2.3 (and from what
I can tell looking at the code for the current version), I end up with
different ccache entries for the same file compiled with and without
distcc.

The following script hopefully illustrates this.  (The obvious
work-around is to run distcc with DISTCC_HOSTS=localhost).

#!/bin/sh

CCACHE_LOGFILE=`pwd`/ccache-log
export CCACHE_LOGFILE

ccache -V
ccache -z
ccache -C
ccache -s
> $CCACHE_LOGFILE

touch foo.c
ccache gcc -c foo.c
distccd --daemon
DISTCC_HOSTS=localhost CCACHE_PREFIX=distcc ccache gcc -c foo.c
pkill distccd
cat $CCACHE_LOGFILE


More information about the ccache mailing list