ccache is a compiler cache. It speeds up re-compilation of C/C++ code by caching previous compiles and detecting when the same compile is being done again.
The following is a step by step guide to how to enable and use ccache on FreeBSD 7.1:
- su
- # cd /usr/ports/devel/ccache
- # make install clean
- # vim /etc/make.conf
.if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*)) && !defined(NOCCACHE)
CC=/usr/local/libexec/ccache/world-cc
CXX=/usr/local/libexec/ccache/world-c++
.endif
Basically we’ve started by installing ccache (steps 1 through 3) and proceeded by editing /etc/make.conf as to enable ccache on builds.
Now we need to update the environment.
Further instructions here
Source: linux-bsd-sharing.blogspot.com (19/01/2009)
Related posts:
- Speed up installing from ports (howto)
- Install FreeBSD 7.x from USB (howto)
- Anonymous FTP server on FreeBSD (howto)
- Creating PBI packages for PC-BSD (howto)
- Install PC-BSD 7 in VMware Fusion (howto)



January 30th, 2009 at 8:35 am
Is ccache very beneficial if you are only really compiling things like ports, where (hopefully) you are only compiling the once? Or does it cache different routines which could be useful with many ports installs?