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

g.esp at free.fr g.esp at free.fr
Wed May 30 01:14:14 MDT 2012


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.

Using the CFLAGS workaround produce this log
[chroot-i486] root:/usr/src/util-linux-2.21.2/sys-utils$ make lscpu V=1 CCACHE_LOGFILE=./mylog

Removing '-fPIE -pie' from CFLAGS show
[chroot-i486] root:/usr/src/util-linux-2.21.2/sys-utils$ make clean && make lscpu V=1 CCACHE_LOGFILE=./no-fPIE.log
...
rm -f *.o
rm -f *.lo
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

which is the old issue in 2.18, fixed in 2.19.

If using CCACHE_DISABLE, compilation does not fail
[chroot-i486] root:/usr/src/util-linux-2.21.2/sys-utils$ make clean && make lscpu V=1 CCACHE_DISABLE=
...
rm -f *.o
rm -f *.lo
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
mv -f .deps/lscpu.Tpo .deps/lscpu.Po
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 cpuset.o -MD -MP -MF .deps/cpuset.Tpo -c -o cpuset.o `test -f '../lib/cpuset.c' || echo './'`../lib/cpuset.c
mv -f .deps/cpuset.Tpo .deps/cpuset.Po
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 strutils.o -MD -MP -MF .deps/strutils.Tpo -c -o strutils.o `test -f '../lib/strutils.c' || echo './'`../lib/strutils.c
mv -f .deps/strutils.Tpo .deps/strutils.Po
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 mbsalign.o -MD -MP -MF .deps/mbsalign.Tpo -c -o mbsalign.o `test -f '../lib/mbsalign.c' || echo './'`../lib/mbsalign.c
mv -f .deps/mbsalign.Tpo .deps/mbsalign.Po
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 tt.o -MD -MP -MF .deps/tt.Tpo -c -o tt.o `test -f '../lib/tt.c' || echo './'`../lib/tt.c
mv -f .deps/tt.Tpo .deps/tt.Po
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 path.o -MD -MP -MF .deps/path.Tpo -c -o path.o `test -f '../lib/path.c' || echo './'`../lib/path.c
mv -f .deps/path.Tpo .deps/path.Po
/bin/sh ../libtool  --tag=CC   --mode=link gcc -std=gnu99 -fsigned-char -Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer  -Wl,--hash-style=gnu -o lscpu lscpu.o cpuset.o strutils.o mbsalign.o tt.o path.o
libtool: link: gcc -std=gnu99 -fsigned-char -Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -Wl,--hash-style=gnu -o lscpu lscpu.o cpuset.o strutils.o mbsalign.o tt.o path.o

What should allow ccache not to retrieve the old hit that fail?

Gilles
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no-fPIE.log
Type: text/x-log
Size: 3631 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/ccache/attachments/20120530/c78e5531/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fPIE.log
Type: text/x-log
Size: 14879 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/ccache/attachments/20120530/c78e5531/attachment-0001.bin>


More information about the ccache mailing list