summaryrefslogtreecommitdiff
path: root/ccache/README
blob: 104a17065c72f4628031f7949ab267aa208f69e4 (plain)
    1 POSTINSTALL
    2 
    3   There are two ways to use ccache. You can either prefix your compilation
    4   commands with ccache or you can let ccache masquerade as the compiler by
    5   prepending /usr/lib/ccache to your $PATH environment variable. The first
    6   method is most convenient if you just want to try out ccache or wish to
    7   use it for some specific projects. The second method is most useful for
    8   when you wish to use ccache for all your compilations.
    9 
   10   You can also set CC and CXX like so,
   11   export CC='ccache gcc' ; export CXX='ccache g++' to /etc/pkgmk.conf
   12   But this method can break on some packages not expecting a space in
   13   CC or CXX.
   14 
   15   You might also want to change the ccache directory, using the CCACHE_DIR
   16   environement variable. (I personally use
   17   export CCACHE_DIR="/var/cache/ccache").
   18 
   19   You may also want to use distcc as a backend to ccache by setting
   20   export CCACHE_PREFIX="distcc"
   21 
   22   Also if you plan to use this same cache between different crux versions and
   23   compiler versions, you can do something like this
   24   export CCACHE_COMPILERCHECK="%compiler% -dumpversion; crux"
   25   to prevent cache errors.

Generated by cgit