ccache

After you installed ccache, it won’t be enabled by default.

First, you need to determine who is allowed to use ccache. You have to add each user to the ccache group. If you want to allow using ccache from chrooted builds, then you need to add the fst user:

# usermod -a -G ccache fst

Second, you need to somehow let the build system to use ccache, and not the compiler directly. If you use makepkg, this is enabled by default (you can disable it with the -B option). If you build manually, then you are on your own, though usually there are two ways to do so:

  • Tell the configure script to use a different compiler:

$ CC=/usr/bin/ccache ./configure
  • Modify path to use the fake compiler provided by ccache:

export PATH=/usr/lib/ccache/bin:$PATH