]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
ccache: make default host-ccache cache dir fit for multi-user setups
authorPeter Korsgaard <peter@korsgaard.com>
Thu, 6 Jul 2017 10:48:41 +0000 (12:48 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 8 Jul 2017 18:32:04 +0000 (20:32 +0200)
commitbdca0d05816fec8472b1d32301f55df152b86466
tree08f29353452f27eb431a477edde5fea26a65bf00
parente861b972bbfdb58e69a6f52705144b37235ed225
ccache: make default host-ccache cache dir fit for multi-user setups

While building I noticed:

>>> host-ccache 3.3.4 Building
conf.c: In function 'conf_create':
conf.c:314:2: warning: too many arguments for format [-Wformat-extra-args]
  conf->cache_dir = format("/home/peko/.buildroot-ccache", get_home_directory());
  ^

As host-ccache gets installed into $(HOST_DIR) and is part of the SDK,
hardcoding the build user homedir isn't really nice for the relocatable
SDK feature (or simply for a SDK used by multiple users).

As the warning shows, CCache replaces "%s" with the current user home
directory, so rewrite BR_CACHE_DIR to use this feature if it begins with
$HOME.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/ccache/ccache.mk