]> code.ossystems Code Review - openembedded-core.git/commitdiff
ccache: Set CCACHE on a per recipe basis
authorWenzong Fan <wenzong.fan@windriver.com>
Fri, 24 Jun 2011 07:42:14 +0000 (15:42 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 Jun 2011 19:52:46 +0000 (20:52 +0100)
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@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass
meta/conf/bitbake.conf

index 52f231675cefa3901de0002290959b251b9031c1..c82dae83e875fee68a0ac189ce94997783d6269f 100644 (file)
@@ -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() {
        :
index ff2a912a4749ecec2fdebad6c217f231101f9350..38367ddf026c5f465c94fed51cb9889dc76ff25e 100644 (file)
@@ -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}"