[oe-commits] Wenzong Fan : ccache: Set CCACHE on a per recipe basis
git version control
git at git.openembedded.org
Thu Jun 30 19:59:06 UTC 2011
Module: openembedded-core.git
Branch: master
Commit: fe03f78fb0bf7d54b9472832e43764e882f918a1
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=fe03f78fb0bf7d54b9472832e43764e882f918a1
Author: Wenzong Fan <wenzong.fan at windriver.com>
Date: Fri Jun 24 15:42:14 2011 +0800
ccache: Set CCACHE on a per recipe basis
Set 'CCACHE_DIR' in 'bitbake.conf' and create the dirs for every
package before task 'do_configure' started.
[RP: Merge dirs variables into one]
Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/base.bbclass | 2 +-
meta/conf/bitbake.conf | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 52f2316..c82dae8 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -194,7 +194,7 @@ python base_eventhandler() {
}
addtask configure after do_unpack do_patch
-do_configure[dirs] = "${S} ${B}"
+do_configure[dirs] = "${CCACHE_DIR} ${S} ${B}"
do_configure[deptask] = "do_populate_sysroot"
base_do_configure() {
:
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index ff2a912..38367dd 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -386,6 +386,7 @@ export PATH
CCACHE = "${@bb.which(bb.data.getVar('PATH', d, 1), 'ccache') and 'ccache '}"
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
+export CCACHE_DIR = "${TMPDIR}/ccache/${HOST_SYS}/${PN}"
export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
export F77 = "${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
More information about the Openembedded-commits
mailing list