summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berton <fabio.berton@criticaltechworks.com>2025-02-27 14:36:13 +0000
committerSteve Sakoman <steve@sakoman.com>2025-03-05 06:03:47 -0800
commit7a06e2daa719ca0cac9905988f72bb0cb546c7b5 (patch)
tree4e558c7338dacdb73b7b42df417724cd8cc42778
parenteaf460dba452c7ec3027d3714517aa49eaf12a01 (diff)
downloadpoky-7a06e2daa719ca0cac9905988f72bb0cb546c7b5.tar.gz
ccache.conf: Add include_file_ctime to sloppiness
When multiple recipes are built in parallel, Ccache sometimes refuses to lookup some objects in cache, leading to undesired cache misses. The root cause of this is an interaction between the way how bitbake constructs a recipe sysroot and Ccache's `include_file_ctime` check. Whenever bitbake creates a recipe's sysroot it hardlinks the files provided by a recipes dependencies. Adding a hardlink to a file changes it's ctime which in turn leads Ccache to believe that the file was modified thus aborting the cache lookup. To avoid this situation, add `include_file_ctime` to the list of checks that should be ignored using the Ccache sloppiness configuration option [1]. Example of a log entry that Ccache ignores a file: / |recipe-sysroot/usr/include/bits/pthread_stack_min.h had status change |near or after invocation (ctime 1739822508.107677255, invocation time |1739822507.970071107) \ 1 - https://ccache.dev/manual/4.10.2.html#config_sloppiness (From OE-Core rev: c74a6d6afc52606825e583cae1162e13a5369498) Signed-off-by: Fabio Berton <fabio.berton@criticaltechworks.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4899698297c7783e02aba5388e0469cc83bd2f70) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/conf/ccache.conf6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/conf/ccache.conf b/meta/conf/ccache.conf
index 4406ae561b..499e5327b8 100644
--- a/meta/conf/ccache.conf
+++ b/meta/conf/ccache.conf
@@ -1 +1,7 @@
1max_size = 0 1max_size = 0
2
3# Avoid spurious cache misses caused by recipe sysroot creation: Creating a
4# recipe sysroot hardlinks all dependent files into place. Hardlinking updates
5# the file's ctime which in turn interferes with ccache's include_file_ctime
6# check.
7sloppiness = include_file_ctime