The handbook says : ---- If you would like to use ccache for non-Portage compilations, add /usr/lib/ccache/bin to the beginning of your PATH variable (before /usr/bin). This can be accomplished by editing /etc/env.d/00basic: Code Listing 9: Editing /etc/env.d/00basic PATH="/usr/local/bin:/opt/bin:/usr/lib/ccache/bin" ---- but it doesn't work, even by adding the line ROOTPATH="/usr/local/bin:/opt/bin:/usr/lib/ccache/bin" Reproducible: Always Steps to Reproduce: 1.Read the handbook 2.edit /etc/env.d/00basic 3.env-update && source /etc/profile 4.which gcc Actual Results: it prints : /usr/bin/gcc ccache is not used Expected Results: It should have printed /usr/lib/ccache/bin/gcc meaning that ccache is used That seems to come from /etc/profile which hard-codes the position of /usr/bin in the path. I don't know if it's a /etc/profile bug, but it's clearly a documentation bug, since the proposed method does not work. I guess there are other ways to change the PATH, which sould be advertised in the handbook.
it does work however, that doesnt change the fact it's wrong ... users should never change files in /etc/env.d/ since those changes will be lost next time a package is emerged the changes should go in /etc/profile and should be something like: PATH="/usr/lib/ccache/bin:${PATH}"
It doesn't work : the advertised procedure adds /usr/lib/ccache/bin in the PATH variable *AFTER* /usr/bin , which is hardcoded in /etc/profile.
I've altered the instructions to use /etc/profile instead of any /etc/env.d files.