[ccache] Old code ccache hit always come back unless CCACHE_DISABLE is used

Joel Rosdahl joel at rosdahl.net
Sat Jun 2 10:29:30 MDT 2012


On 1 June 2012 12:12,  <g.esp at free.fr> wrote:
> On the no-fPIE case, using CCACHE_CPP2=1 change compilation to work.
> Any next recompilation even without CCACHE_CPP2=1 result in cache hit.

Yes, so this means that the compiler has a bug. You should be able to
reproduce it by running these two commands:

/usr/bin/gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -include ../config.h
-I../include -DLOCALEDIR="/usr/share/locale" -fsigned-char -Os
-march=i486 -mtune=pentium -pipe -fomit-frame-pointer -c -MT lscpu.o
-MD -MP -MF .deps/lscpu.Tpo -E lscpu.c -o lscpu.i
/usr/bin/gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -include ../config.h
-I../include -DLOCALEDIR="/usr/share/locale" -fsigned-char -Os
-march=i486 -mtune=pentium -pipe -fomit-frame-pointer -c lscpu.i -o
lscpu.o

As mentioned, the ccache workaround for this kind of bug is to set
CCACHE_CPP2=1.

-- Joel


More information about the ccache mailing list