diff options
author | Ross Burton <ross.burton@intel.com> | 2016-06-20 13:13:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-23 14:26:15 +0100 |
commit | 95cd78a7b5861f8ef10f419ba336439c50fda9ab (patch) | |
tree | 423f54bf68160b209a2e849bd2933337efa7c197 /meta/conf | |
parent | 51059ee20ddc4e7584700bc3ef04a8ce54c1312c (diff) | |
download | poky-95cd78a7b5861f8ef10f419ba336439c50fda9ab.tar.gz |
bitbake.conf: don't set CCACHE_DIR to $HOME by default
If the user hasn't inherited ccache.bbclass then CCACHE_DIR is set to $HOME.
This was to work around a bug (#2554) for some users where if ccache < 3.1.10
(released 2014-10-19) was installed and enabled by default (i.e. /usr/bin/gcc is
a symlink to ccache) and ccache.bbclass wasn't being inherited then autogen
would fail to build because it sets $HOME to /dev/null during the build and
ccache (prior to 3.1.10) would always create CCACHE_DIR even if it was disabled.
As the default is $HOME/.ccache, this results in ccache attempting to create
/dev/null/.ccache.
However there was a mistake in this assignment of CCACHE_DIR - it should be
$HOME/.ccache - as ccache will do cleanup inside CCACHE_DIR which will result in
it deleting $HOME/tmp. In the future when we can assume that everyone has
ccache 3.1.10 onwards this assignment can be deleted, but as of now we still
support OpenSUSE 13.2 which ships with 3.1.9 so fix the assignment to be
$HOME/.ccache.
[ YOCTO #9798 ]
(From OE-Core rev: 15eaf9cb1fa19036fe4442905876dae94070b04d)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf')
-rw-r--r-- | meta/conf/bitbake.conf | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 942b8b1bf7..a72d2f6054 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -450,10 +450,10 @@ CCACHE ??= "" | |||
450 | # Disable ccache explicitly if CCACHE is null since gcc may be a symlink | 450 | # Disable ccache explicitly if CCACHE is null since gcc may be a symlink |
451 | # of ccache some distributions (e.g., Fedora 17). | 451 | # of ccache some distributions (e.g., Fedora 17). |
452 | export CCACHE_DISABLE ??= "${@[0,1][d.getVar('CCACHE', True) == '']}" | 452 | export CCACHE_DISABLE ??= "${@[0,1][d.getVar('CCACHE', True) == '']}" |
453 | # Assign CCACHE_DIR a default value to fix a bug of ccache 3.1.7, | 453 | # ccache < 3.1.10 will create CCACHE_DIR on startup even if disabled, and |
454 | # since it would always create CCACHE_DIR/.ccache even if | 454 | # autogen sets HOME=/dev/null so in certain situations builds can fail. |
455 | # CCACHE_DISABLE = 1. | 455 | # Explicitly export CCACHE_DIR until we can assume ccache >3.1.10 on the host. |
456 | export CCACHE_DIR ??= "${@os.getenv('HOME')}" | 456 | export CCACHE_DIR ??= "${@os.getenv('HOME')}/.ccache" |
457 | 457 | ||
458 | TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" | 458 | TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" |
459 | 459 | ||