| Message ID | 20250718151017.3153315-1-ross.burton@arm.com |
|---|---|
| State | New |
| Headers | show |
| Series | [v2,1/3] cmake: drop CCACHE_COMPILERCHECK | expand |
Note that I didn’t send 2/3 and 3/3 as they’re WIP patches and I didn’t mean to (almost) send them. This one is good. Ross > On 18 Jul 2025, at 16:10, Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > > This variable controls how ccache determines if the cache is valid or not > for a given compiler. > > By default, ccache looks at the mtime of the compiler binary. > > Signed-off-by: Ross Burton <ross.burton@arm.com> > --- > meta/classes/ccache.bbclass | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass > index 01e9816c706..5ce23e50f34 100644 > --- a/meta/classes/ccache.bbclass > +++ b/meta/classes/ccache.bbclass > @@ -42,9 +42,6 @@ CCACHE_NATIVE_RECIPES_ALLOWED ?= "" > # in different builds. > export CCACHE_BASEDIR ?= "${TMPDIR}" > > -# Used for sharing cache files after compiler is rebuilt > -export CCACHE_COMPILERCHECK ?= "%compiler% -dumpspecs" > - > export CCACHE_CONFIGPATH ?= "${COREBASE}/meta/conf/ccache.conf" > > export CCACHE_DIR ?= "${CCACHE_TOP_DIR}/${MULTIMACH_TARGET_SYS}/${PN}" > -- > 2.43.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#220599): https://lists.openembedded.org/g/openembedded-core/message/220599 > Mute This Topic: https://lists.openembedded.org/mt/114222596/6875888 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ross.burton@arm.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Fri, Jul 18, 2025 at 8:10 AM Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > > This variable controls how ccache determines if the cache is valid or not > for a given compiler. > > By default, ccache looks at the mtime of the compiler binary. > this may become interesting when compiler binary is used from sstate built on another machine, it might be identical binary but mtime maybe different. > Signed-off-by: Ross Burton <ross.burton@arm.com> > --- > meta/classes/ccache.bbclass | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass > index 01e9816c706..5ce23e50f34 100644 > --- a/meta/classes/ccache.bbclass > +++ b/meta/classes/ccache.bbclass > @@ -42,9 +42,6 @@ CCACHE_NATIVE_RECIPES_ALLOWED ?= "" > # in different builds. > export CCACHE_BASEDIR ?= "${TMPDIR}" > > -# Used for sharing cache files after compiler is rebuilt > -export CCACHE_COMPILERCHECK ?= "%compiler% -dumpspecs" > - > export CCACHE_CONFIGPATH ?= "${COREBASE}/meta/conf/ccache.conf" > > export CCACHE_DIR ?= "${CCACHE_TOP_DIR}/${MULTIMACH_TARGET_SYS}/${PN}" > -- > 2.43.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#220599): https://lists.openembedded.org/g/openembedded-core/message/220599 > Mute This Topic: https://lists.openembedded.org/mt/114222596/1997914 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On 19 Jul 2025, at 02:41, Khem Raj <raj.khem@gmail.com> wrote: > > On Fri, Jul 18, 2025 at 8:10 AM Ross Burton via lists.openembedded.org > <ross.burton=arm.com@lists.openembedded.org> wrote: >> >> This variable controls how ccache determines if the cache is valid or not >> for a given compiler. >> >> By default, ccache looks at the mtime of the compiler binary. >> > > this may become interesting when compiler binary is used from sstate > built on another machine, it might be identical binary > but mtime maybe different. I was having these thoughts after posting too. I _think_ the mtimes are preserved so reused sstate should still be identical mtimes. Ross
On 21 Jul 2025, at 16:20, Ross Burton <Ross.Burton@arm.com> wrote: > > On 19 Jul 2025, at 02:41, Khem Raj <raj.khem@gmail.com> wrote: >> >> On Fri, Jul 18, 2025 at 8:10 AM Ross Burton via lists.openembedded.org >> <ross.burton=arm.com@lists.openembedded.org> wrote: >>> >>> This variable controls how ccache determines if the cache is valid or not >>> for a given compiler. >>> >>> By default, ccache looks at the mtime of the compiler binary. >>> >> >> this may become interesting when compiler binary is used from sstate >> built on another machine, it might be identical binary >> but mtime maybe different. > > I was having these thoughts after posting too. > > I _think_ the mtimes are preserved so reused sstate should still be identical mtimes. Confirmed that mtimes are preserved. I just wiped my tmp and the compiler in my eg vim recipe’s sysroot has a mtime of two days ago. I think this is acceptable behaviour: we’ll rebuild if the compiler changes. Reposting this patch with another one that should be good to go. Ross
On Thu, Jul 24, 2025 at 9:21 AM Ross Burton <Ross.Burton@arm.com> wrote: > > On 21 Jul 2025, at 16:20, Ross Burton <Ross.Burton@arm.com> wrote: > > > > On 19 Jul 2025, at 02:41, Khem Raj <raj.khem@gmail.com> wrote: > >> > >> On Fri, Jul 18, 2025 at 8:10 AM Ross Burton via lists.openembedded.org > >> <ross.burton=arm.com@lists.openembedded.org> wrote: > >>> > >>> This variable controls how ccache determines if the cache is valid or not > >>> for a given compiler. > >>> > >>> By default, ccache looks at the mtime of the compiler binary. > >>> > >> > >> this may become interesting when compiler binary is used from sstate > >> built on another machine, it might be identical binary > >> but mtime maybe different. > > > > I was having these thoughts after posting too. > > > > I _think_ the mtimes are preserved so reused sstate should still be identical mtimes. > > Confirmed that mtimes are preserved. I just wiped my tmp and the compiler in my eg vim recipe’s sysroot has a mtime of two days ago. > > I think this is acceptable behaviour: we’ll rebuild if the compiler changes. > > Reposting this patch with another one that should be good to go. Thanks, yeah if mtimes work this will be a good improvement and will work across clang and gcc both > > Ross
diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass index 01e9816c706..5ce23e50f34 100644 --- a/meta/classes/ccache.bbclass +++ b/meta/classes/ccache.bbclass @@ -42,9 +42,6 @@ CCACHE_NATIVE_RECIPES_ALLOWED ?= "" # in different builds. export CCACHE_BASEDIR ?= "${TMPDIR}" -# Used for sharing cache files after compiler is rebuilt -export CCACHE_COMPILERCHECK ?= "%compiler% -dumpspecs" - export CCACHE_CONFIGPATH ?= "${COREBASE}/meta/conf/ccache.conf" export CCACHE_DIR ?= "${CCACHE_TOP_DIR}/${MULTIMACH_TARGET_SYS}/${PN}"
This variable controls how ccache determines if the cache is valid or not for a given compiler. By default, ccache looks at the mtime of the compiler binary. Signed-off-by: Ross Burton <ross.burton@arm.com> --- meta/classes/ccache.bbclass | 3 --- 1 file changed, 3 deletions(-)