]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
ccache: support changing the output directory
authorArnout Vandecappelle <arnout@mind.be>
Sun, 4 Oct 2015 15:25:32 +0000 (16:25 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 4 Oct 2015 16:22:21 +0000 (18:22 +0200)
commit1e97b2787331c5f4452d8c9a76961a89ec355d9d
tree3650a31a1a9b2fa3b9955823839057fa7b91ac89
parentf4682cf933a3e0e1017aa8827a8c57fdd79e30f3
ccache: support changing the output directory

When building in a different output directory than the original build,
there will currently be a lot of ccache misses because in many cases
there is some -I/... absolute path in the compilation. Ccache has an
option CCACHE_BASEDIR to substitute absolute paths with relative paths,
so they wil be the same in the hash (and in the output).

Since there are some disadvantages to this path rewriting, it is made
optional as BR2_CCACHE_USE_BASEDIR. It defaults to y because the
usefulness of ccache is severely reduced without this option.

In addition to CCACHE_BASEDIR, we also substitute away the occurences
of $(HOST_DIR) in the calculation of the compiler hash. This is done
regardless of the setting of BR2_CCACHE_USE_BASEDIR because it's
quite harmless.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Config.in
docs/manual/ccache-support.txt
package/gcc/gcc.mk
toolchain/toolchain-wrapper.c
toolchain/toolchain-wrapper.mk