[OE-core] [PATCH 0/2] bitbake.conf: gracefully work with ccache environment variables

Marko Lindqvist cazfi74 at gmail.com
Mon May 14 22:00:18 UTC 2012


As you can see from my answer to last part I quote, I'm not against
your patch, so don't read first parts of this email with that mindset.
They are more generic discussion about ccache caches.

On 14 May 2012 23:58, Jason Wessel <jason.wessel at windriver.com> wrote:
>
> This is only an issue if the compiler has changed.  In my case it is
> not changing, or at least it should be the same each time.

 Several years back ccache detected if compiler is the same by binary
size and timestamp, so compiler rebuild (with new timestamp) resulted
contents of the cache getting invalidated. They talked about changing
it to check md5sum of the compiler binary instead, but I haven't
followed if that's implemented already.

>  I use one
> external ccache for all the embedded target work on a per build server
> basis and have done so for years for non-bitbake environments.  I
> would like the same functionality from bitbake based builds.
>
> Right now with the external ccache my kernel compiles alone go from >
> 6 min down to < 30 seconds, so there is a definite desire on my side
> to have this work.

 Yes, I just wanted to make sure it works best way possible in every
possible use-case.

 Optimal results would come from using external (what I refer here as
my "normal" cache) cache for anything outside OpenEmbedded scope, and
for initial cross-compiler builds of OpenEmbedded (as that is done
with external compiler that will remain the same even when one does
complete rebuild), and second ("internal") cache for the rest of
OpenEmbedded build. Contents of latter gets invalid when one does full
rebuild, so it can be removed before one.
 I don't know, but assume that it would be a bit hard to select
correct one from two caches in OpenEmbedded builds (external one for
some builds, internal for others) so optimal realistic setup is that
user's normal external cache is not used at all inside OpenEmbedded.
Now, if user wants to override cache location (and thus create what
one may consider "external" cache) he should be allowed to do so, but
thing here is that the cache one uses normally does not get polluted
accidentally.

>> So you are proposing that user has to opt-out from that behavior (by
>> unsetting his normal CCACHE_DIR before running bitbake) and no
>> longer opt-in (by adding CCACHE_DIR to whitelist)
>
> The defaults remain the defaults, I am not changing anything to that
> end.  I only aim to have configurability via the local.conf for
> various use cases surrounding ccache.  As I mentioned before I'll just
> submit a new patch to add CCACHE_DIR to the hash whitelist so it is
> not in the ssatate sum.  All the other problems were a result of pilot
> error.

 Sorry, I earlier missed the "hash" part, and thought that you were
changing it so that OpenEmbedded would use external CCACHE_DIR unlike
before. That is: to change it to pollute my normal cache.


 - ML




More information about the Openembedded-core mailing list