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

g.esp at free.fr g.esp at free.fr
Fri Jun 1 04:12:30 MDT 2012

----- Mail original -----
> De: "Joel Rosdahl" <joel at rosdahl.net>
> À: "g esp" <g.esp at free.fr>
> Cc: ccache at lists.samba.org
> Envoyé: Mercredi 30 Mai 2012 19:53:31
> Objet: Re: [ccache] Old code ccache hit always come back unless CCACHE_DISABLE is used
> On 30 May 2012 09:14,  <g.esp at free.fr> wrote:
> > I had in the past an issue compiling util-linux-2.18 lscpu that was
> > worked around adding '-fPIE -pie' to CFLAGS.
> > The issue is that now with any new and fixed util-linux package,
> > this workaround can't be removed or old compilation issue come
> > back, unless CCACHE_DISABLE is used.
> > [...]
> > What should allow ccache not to retrieve the old hit that fail?
> As can be seen in no-fPIE.log, ccache doesn't get any cache hit, so it
> isn't related to false cache hits.
> My guess is that when you compile without "-fPIE -pie", the compiler
> can't compile its own preprocessed output. If this is the case,
> setting CCACHE_CPP2=1 should make it work.
> -- Joel
For the record, the original issue was with ccache-3.1.5 or 3.1.6, binutils-2.21.1a, gcc-4.4.5 (patched spec to default to -fPIE)

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.

I changed to ccache-3.1.7 and behavior is the same.
I next changed gcc to gcc-4.4.7 and behavior is the same.

Compilation work :

Compilation fail :
- with ccache-3.1.{5,6,7} and without CCACHE_CPP2=1 (using CCACHE_RECACHE to not depend from ccache content)
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 -MT lscpu.o -MD -MP -MF .deps/lscpu.Tpo -c -o lscpu.o lscpu.c
lscpu.c: In function 'read_hypervisor':
lscpu.c:446: error: can't find a register in class 'BREG' while reloading 'asm'
lscpu.c:446: error: 'asm' operand has impossible constraints
make: *** [lscpu.o] Error 1


More information about the ccache mailing list