Wednesday, October 2, 2019

Speed up compile and rebuilding with ccache-2.4

Rebuilding on this old 486 takes forever sometimes. ccache allows to speed up this process.

Build

From source.

Install


Create links
ln -s ccache /usr/local/bin/gcc
ln -s ccache /usr/local/bin/g++
ln -s ccache /usr/local/bin/cc
ln -s ccache /usr/local/bin/c++
Set cache:
ccache -M 250M

What is first:
type -a gcc

After some re-buildings:
 ccache -s
ccache -s
cache directory                     /root/.ccache
cache hit                            339
cache miss                           317
called for link                       75
compile failed                        10
preprocessor error                    11
not a C/C++ file                      11
autoconf compile/link                313
no input file                         58
files in cache                       634
cache size                           3.2 Mbytes
max cache size                     250.0 Mbytes
 

No comments:

Post a Comment