[ccache] Problem with using ccache during kernel compilation

Christopher Tate ctate at google.com
Tue Jan 21 11:08:57 MST 2014


If removing the .o files and recompiling results in pulling the .o files
out of ccache, but reconfiguring and recompiling does *not*, that implies
that the configuration step is literally producing some textually different
source file contents each time.

Does the kernel configuration include e.g. a generated string containing
the timestamp of when the configuration was performed, or some such thing?
 That sort of thing can easily force a full recompilation (since it would
mean that after each reconfiguration, even with the same settings and no
other source changes, the text of each compilation module would indeed be
different).

--
chris



On Tue, Jan 21, 2014 at 4:15 AM, Andrew Stubbs <ams at codesourcery.com> wrote:

> On 15/01/14 16:16, Piotr Kiszka wrote:
> > I am trying to use ccache during kernel building.But there is always
> > zero cache hits during second kernel compilation:
>
> I've observed this also. It's annoying!
>
> The problem seems to be something in the way the kernel config
> autogenerates the header files. I did find out what it was, but I've
> forgotten now.
>
> In fact, if you build the kernel, then delete all the .o files, and then
> run make again, you *do* get cache hits. "make clean" might be OK too, I'm
> not sure. Only if you start from completely clean, or reconfigure, then it
> doesn't work. Of course, this is the usual use case.
>
> I don't recall finding a workable solution.
>
> Sorry.
>
> Andrew
>
> P.s. A nice feature for ccache would be for it to report *why* a cached
> result wasn't found. This would only be meaningful in direct-mode, but
> still might be helpful. In preprocessor mode, *I* might find a list of
> hashes useful, so I could compare between runs, but this wouldn't be
> universally helpful, I suspect.
>
> _______________________________________________
> ccache mailing list
> ccache at lists.samba.org
> https://lists.samba.org/mailman/listinfo/ccache
>


More information about the ccache mailing list