From patchwork Sat Jul 21 11:55:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: bitbake: do not set CCACHE_DISABLE=0 Date: Sat, 21 Jul 2012 11:55:46 -0000 From: Enrico Scholz X-Patchwork-Id: 32787 Message-Id: <1342871746-14583-1-git-send-email-enrico.scholz@sigma-chemnitz.de> To: openembedded-core@lists.openembedded.org Cc: Enrico Scholz ccache checks for existence of environment; not for its value: ---- ccache-3.1.7/ccache.c --- if (getenv("CCACHE_DISABLE")) { cc_log("ccache is disabled"); Hence, avoid setting of $CCACHE_DISABLE instead of assigning '0'. Unfortunately, bitbake has a similar behavior when evaluating 'export' and 'unexport' flags so that this variable must be set in a python function instead of declaring it in bitbake.conf. Signed-off-by: Enrico Scholz --- meta/classes/base.bbclass | 8 ++++++++ meta/conf/bitbake.conf | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 1f76023..9f9c803 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -309,6 +309,14 @@ do_build () { python () { import exceptions, string, re + # Disable ccache explicitly if CCACHE is null since gcc may be a + # symlink of ccache some distributions (e.g., Fedora 17). Please + # note that only the existence of $CCACHE_DISABLE matters; the + # value is ignored. + if d.getVar('CCACHE', True) == '': + d.setVar('CCACHE_DISABLE', True) + d.setVarFlag('CCACHE_DISABLE', 'export', True) + # Handle PACKAGECONFIG # # These take the form: diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index a8a1665..1bb66ad 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -420,9 +420,6 @@ 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 value to fix a bug of ccache 3.1.7, # since it would always create CCACHE_DIR/.ccache even if # CCACHE_DISABLE = 1.