All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] ccache: don't export CCACHE_DISABLE globally
@ 2017-07-12 12:43 Ross Burton
  2017-07-12 12:43 ` [PATCH 2/5] bitbake.conf: add CCACHE_NOHASHDIR to hash whitelist Ross Burton
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ross Burton @ 2017-07-12 12:43 UTC (permalink / raw)
  To: openembedded-core

CCACHE_DISABLE was added to bitbake.conf in oe-core dd2bab (June 2012) because
autogen-native exports HOME=/dev/null during the build, which is then used by a
host ccache to construct the path to it's cache (/dev/null/.ccache) and this
fails.

However we now always export CCACHE_DIR to solve the same problem in a more
efficient way so CCACHE_DISABLE can be deleted.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/ccache.bbclass | 1 -
 meta/conf/bitbake.conf      | 5 +----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index d58c8f6e57a..9f1b1f45e34 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -1,6 +1,5 @@
 CCACHE = "${@bb.utils.which(d.getVar('PATH'), 'ccache') and 'ccache '}"
 export CCACHE_DIR ?= "${TMPDIR}/ccache/${MULTIMACH_TARGET_SYS}/${PN}"
-CCACHE_DISABLE[unexport] = "1"
 
 # We need to stop ccache considering the current directory or the
 # debug-prefix-map target directory to be significant when calculating
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 962eb437c7b..042a03cbf90 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -480,9 +480,6 @@ HOSTTOOLS_NONFATAL += "aws ccache gcc-ar gpg ld.bfd ld.gold nc sftp socat sudo"
 HOSTTOOLS_NONFATAL += "join nl size yes zcat"
 
 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') == '']}"
 # ccache < 3.1.10 will create CCACHE_DIR on startup even if disabled, and
 # autogen sets HOME=/dev/null so in certain situations builds can fail.
 # Explicitly export CCACHE_DIR until we can assume ccache >3.1.10 on the host.
@@ -845,7 +842,7 @@ BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DI
     SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
     USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
     PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
-    CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX \
+    CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE LICENSE_PATH SDKPKGSUFFIX \
     WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR BUILD_ARCH SSTATE_PKGARCH \
     BB_WORKERCONTEXT BB_LIMITEDDEPS extend_recipe_sysroot DEPLOY_DIR"
 BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SSH_AGENT_PID \
-- 
2.11.0



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

* [PATCH 2/5] bitbake.conf: add CCACHE_NOHASHDIR to hash whitelist
  2017-07-12 12:43 [PATCH 1/5] ccache: don't export CCACHE_DISABLE globally Ross Burton
@ 2017-07-12 12:43 ` Ross Burton
  2017-07-12 12:43 ` [PATCH 3/5] ccache: let ccache create CCACHE_DIR, reducing hash changes Ross Burton
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ross Burton @ 2017-07-12 12:43 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 042a03cbf90..9a3aa8bbf29 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -842,7 +842,7 @@ BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DI
     SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
     USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
     PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
-    CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE LICENSE_PATH SDKPKGSUFFIX \
+    CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_NOHASHDIR LICENSE_PATH SDKPKGSUFFIX \
     WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR BUILD_ARCH SSTATE_PKGARCH \
     BB_WORKERCONTEXT BB_LIMITEDDEPS extend_recipe_sysroot DEPLOY_DIR"
 BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SSH_AGENT_PID \
-- 
2.11.0



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

* [PATCH 3/5] ccache: let ccache create CCACHE_DIR, reducing hash changes
  2017-07-12 12:43 [PATCH 1/5] ccache: don't export CCACHE_DISABLE globally Ross Burton
  2017-07-12 12:43 ` [PATCH 2/5] bitbake.conf: add CCACHE_NOHASHDIR to hash whitelist Ross Burton
@ 2017-07-12 12:43 ` Ross Burton
  2017-07-12 12:43 ` [PATCH 4/5] ccache: don't search PATH for ccache Ross Burton
  2017-07-12 12:43 ` [PATCH 5/5] lib/oe/sstatesig: exclude ccache-native from signature hashes Ross Burton
  3 siblings, 0 replies; 5+ messages in thread
From: Ross Burton @ 2017-07-12 12:43 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/ccache.bbclass | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index 9f1b1f45e34..960902065c4 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -9,6 +9,3 @@ export CCACHE_NOHASHDIR ?= "1"
 
 DEPENDS_append_class-target = " ccache-native"
 DEPENDS[vardepvalueexclude] = " ccache-native"
-
-do_configure[dirs] =+ "${CCACHE_DIR}"
-do_kernel_configme[dirs] =+ "${CCACHE_DIR}"
-- 
2.11.0



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

* [PATCH 4/5] ccache: don't search PATH for ccache
  2017-07-12 12:43 [PATCH 1/5] ccache: don't export CCACHE_DISABLE globally Ross Burton
  2017-07-12 12:43 ` [PATCH 2/5] bitbake.conf: add CCACHE_NOHASHDIR to hash whitelist Ross Burton
  2017-07-12 12:43 ` [PATCH 3/5] ccache: let ccache create CCACHE_DIR, reducing hash changes Ross Burton
@ 2017-07-12 12:43 ` Ross Burton
  2017-07-12 12:43 ` [PATCH 5/5] lib/oe/sstatesig: exclude ccache-native from signature hashes Ross Burton
  3 siblings, 0 replies; 5+ messages in thread
From: Ross Burton @ 2017-07-12 12:43 UTC (permalink / raw)
  To: openembedded-core

Instead of searching $PATH for ccache in all builds, simply set CCACHE in target
builds to 'ccache ' directly.  We build-depend on ccache-native for target
builds so this will always be present.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/ccache.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index 960902065c4..8e4b5ab8410 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -1,4 +1,5 @@
-CCACHE = "${@bb.utils.which(d.getVar('PATH'), 'ccache') and 'ccache '}"
+CCACHE_class-target = "ccache "
+
 export CCACHE_DIR ?= "${TMPDIR}/ccache/${MULTIMACH_TARGET_SYS}/${PN}"
 
 # We need to stop ccache considering the current directory or the
-- 
2.11.0



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

* [PATCH 5/5] lib/oe/sstatesig: exclude ccache-native from signature hashes
  2017-07-12 12:43 [PATCH 1/5] ccache: don't export CCACHE_DISABLE globally Ross Burton
                   ` (2 preceding siblings ...)
  2017-07-12 12:43 ` [PATCH 4/5] ccache: don't search PATH for ccache Ross Burton
@ 2017-07-12 12:43 ` Ross Burton
  3 siblings, 0 replies; 5+ messages in thread
From: Ross Burton @ 2017-07-12 12:43 UTC (permalink / raw)
  To: openembedded-core

Enabling ccache should not cause a complete rebuild, so filter out ccache-native
from the dependencies the same way we do for quilt-native (so the world doesn't
repatch if quilt changes).

This doesn't effect the actual dependencies, just the dependencies that impact
the hash.

[ YOCTO #11417 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/lib/oe/sstatesig.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index b8dd4c869ed..5a4093266d4 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -29,7 +29,7 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
         return True
 
     # Quilt (patch application) changing isn't likely to affect anything
-    excludelist = ['quilt-native', 'subversion-native', 'git-native']
+    excludelist = ['quilt-native', 'subversion-native', 'git-native', 'ccache-native']
     if depname in excludelist and recipename != depname:
         return False
 
-- 
2.11.0



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

end of thread, other threads:[~2017-07-12 12:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12 12:43 [PATCH 1/5] ccache: don't export CCACHE_DISABLE globally Ross Burton
2017-07-12 12:43 ` [PATCH 2/5] bitbake.conf: add CCACHE_NOHASHDIR to hash whitelist Ross Burton
2017-07-12 12:43 ` [PATCH 3/5] ccache: let ccache create CCACHE_DIR, reducing hash changes Ross Burton
2017-07-12 12:43 ` [PATCH 4/5] ccache: don't search PATH for ccache Ross Burton
2017-07-12 12:43 ` [PATCH 5/5] lib/oe/sstatesig: exclude ccache-native from signature hashes Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.