Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] ccache: Disable CCACHE_HASHDIR by default
@ 2017-03-11 16:54 Mike Crowe
  2017-03-13 13:33 ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Crowe @ 2017-03-11 16:54 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mike Crowe

As of ccache-3.3, ccache will always include the current directory
in the hash when the compiler is configured to output debug
information. The current directory will change every time ${PV}
changes, which will invalidate the cache.

ccache apparently does this so that paths in the debug information will
always be correct. In an OE world these paths may already be missing or
incorrect due to rm_work or the use of a shared sstate cache, so it doesn't
seem as if we're losing much by disabling this feature.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
 meta/classes/ccache.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index 76c8828..6b20846 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -2,6 +2,13 @@ CCACHE = "${@bb.utils.which(d.getVar('PATH'), 'ccache') and 'ccache '}"
 export CCACHE_DIR ?= "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}"
 CCACHE_DISABLE[unexport] = "1"
 
+# As of ccache-3.3, ccache will always include the current directory
+# in the hash when the compiler is configured to output debug
+# information. The current directory will change every time ${PV}
+# changes which greatly reduces the utility of ccache. So, let's not
+# consider the current directory to be significant by default.
+export CCACHE_NOHASHDIR ?= "1"
+
 DEPENDS_append_class-target = " ccache-native"
 DEPENDS[vardepvalueexclude] = " ccache-native"
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-13  9:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-11 16:54 [PATCH] ccache: Disable CCACHE_HASHDIR by default Mike Crowe
2017-03-13 13:33 ` Burton, Ross
2017-03-13 13:51   ` Mike Crowe
2017-03-15 11:54     ` Mike Crowe
2017-06-13  9:41       ` Mike Crowe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox