diff options
-rw-r--r-- | meta/classes/ccache.bbclass | 1 | ||||
-rw-r--r-- | meta/conf/bitbake.conf | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass index 10f9b9f9aa..5aa2da2df4 100644 --- a/meta/classes/ccache.bbclass +++ b/meta/classes/ccache.bbclass | |||
@@ -1,5 +1,6 @@ | |||
1 | CCACHE = "${@bb.which(d.getVar('PATH', True), 'ccache') and 'ccache '}" | 1 | CCACHE = "${@bb.which(d.getVar('PATH', True), 'ccache') and 'ccache '}" |
2 | export CCACHE_DIR = "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}" | 2 | export CCACHE_DIR = "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}" |
3 | CCACHE_DISABLE[unexport] = "1" | ||
3 | 4 | ||
4 | do_configure[dirs] =+ "${CCACHE_DIR}" | 5 | do_configure[dirs] =+ "${CCACHE_DIR}" |
5 | do_kernel_configme[dirs] =+ "${CCACHE_DIR}" | 6 | do_kernel_configme[dirs] =+ "${CCACHE_DIR}" |
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 | |||
414 | ################################################################## | 414 | ################################################################## |
415 | 415 | ||
416 | CCACHE ??= "" | 416 | CCACHE ??= "" |
417 | # Disable ccache explicitly if CCACHE is null since gcc may be a symlink | ||
418 | # of ccache some distributions (e.g., Fedora 17). | ||
419 | export CCACHE_DISABLE ??= "${@[0,1][d.getVar('CCACHE', True) == '']}" | ||
420 | # Assign CCACHE_DIR a default vaule to fix a bug of ccache 3.1.7, | ||
421 | # since it would always create CCACHE_DIR/.ccache even if | ||
422 | # CCACHE_DISABLE = 1. | ||
423 | export CCACHE_DIR ??= "${@os.getenv('HOME')}" | ||
424 | |||
417 | TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" | 425 | TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" |
418 | 426 | ||
419 | export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" | 427 | export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" |