diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2012-06-25 17:31:19 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-28 16:23:18 +0100 |
commit | dd2bab9b6a973d8086dfb6282e781fd79d30b05a (patch) | |
tree | d1ec98c20f65624364982453428f15eafd3cf5a6 /meta/conf | |
parent | e65dfa26f1331b903a22353f34fb675ba0acbf30 (diff) | |
download | openembedded-core-dd2bab9b6a973d8086dfb6282e781fd79d30b05a.tar.gz openembedded-core-dd2bab9b6a973d8086dfb6282e781fd79d30b05a.tar.bz2 openembedded-core-dd2bab9b6a973d8086dfb6282e781fd79d30b05a.zip |
bitbake.conf: disable ccache explicitly if it is not enabled
The autogen-native built error on FC17:
ccache: failed to create /dev/null/.ccache
This is because the default gcc command of FC17 is a symlink to ccache,
so the ccache will always be used regardless to the setting of CCACHE,
ccache uses $HOME/.ccache as the CACHE_DIR by default, but autogen set
HOME=/dev/null, so the error happens.
Disable ccache explicitly if it is not enabled would fix the problem,
otherwise it would always use ccache regardless to the setting of CCACHE
on Fedora 17.
The ccache 3.1.7 has a bug, it would always create $CCCHE_DIR/.ccache
even CCACHE_DISABLE=1.
Unset CCACHE_DISABLE in ccache.bbclass, since ccache only checks whether
there is a CCACHE_DISABLE in the environment or not, it doesn't care about
its value, so we need unset it explicitly when enable ccache.
[YOCTO #2554]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Diffstat (limited to 'meta/conf')
-rw-r--r-- | meta/conf/bitbake.conf | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index fbc0ca205a..9b26580f1b 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -414,6 +414,14 @@ export PATH ################################################################## CCACHE ??= "" +# Disable ccache explicitly if CCACHE is null since gcc may be a symlink +# of ccache some distributions (e.g., Fedora 17). +export CCACHE_DISABLE ??= "${@[0,1][d.getVar('CCACHE', True) == '']}" +# Assign CCACHE_DIR a default vaule to fix a bug of ccache 3.1.7, +# since it would always create CCACHE_DIR/.ccache even if +# CCACHE_DISABLE = 1. +export CCACHE_DIR ??= "${@os.getenv('HOME')}" + TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" |