[Buildroot] [PATCH 18/19] ccache: use mtime for external toolchain, CONF_OPTS for internal toolchain

Arnout Vandecappelle arnout at mind.be
Mon Sep 21 22:32:13 UTC 2015



On 21-09-15 23:43, Samuel Martin wrote:
> Hi Arnout,
> 
> Just some minor comments below.
> 
> On Sun, Sep 20, 2015 at 9:28 PM, Arnout Vandecappelle (Essensium/Mind)
> <arnout at mind.be> wrote:
> [...]
>>
>> +ifeq ($(BR2_CCACHE),y)
>> +HOST_GCC_COMMON_CCACHE_HASH_FILES += $(DL_DIR)/$(GCC_SOURCE)
>> +HOST_GCC_COMMON_CCACHE_HASH_FILES += package/gcc/$(GCC_VERSION)/*.patch
>> +ifeq ($(BR2_xtensa),y)
>> +HOST_GCC_COMMON_CCACHE_HASH_FILES += $(HOST_GCC_XTENSA_OVERLAY_TAR)
>> +endif
>> +ifeq ($(ARCH),powerpc)
>> +ifneq ($(BR2_SOFT_FLOAT),)
>> +HOST_GCC_COMMON_CCACHE_HASH_FILES += package/gcc/$(GCC_VERSION)/1000-powerpc-link-with-math-lib.patch.conditional
>> +endif
>> +endif
> 
> Maybe it is a rare case, should not the gcc's patches from the
> BR2_GLOBAL_PATCH_DIR location be added to the
> HOST_GCC_COMMON_CCACHE_HASH_FILES list as well?

 True. Note that in the global patch dir, you'd have to create separate
gcc-initial and gcc-final directories, which makes it less likely that someone
would actually do this.

 I was also thinking about GCC_OVERRIDE_SRCDIR, which is not covered at the moment.

 However, these things make the already fairly complicated hash logic even more
complex. Do we really need to support such exotic cases?


> 
>> +
>> +HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_HASH=\"`\
>> +       printf '%s' $($(PKG)_CONF_OPTS) $(GCC_VERSION) \
>> +               | sha256sum - $(HOST_GCC_COMMON_CCACHE_HASH_FILES) \
>> +               | cut -c -64 | tr -d '\n'`\"
> 
> Depending on the number of items in the
> HOST_GCC_COMMON_CCACHE_HASH_FILES list, the BR_CCACHE_HASH definition
> can be quite long...

 Is that a problem?

 Regards,
 Arnout

> 
>> +endif # BR2_CCACHE
>> +
> [...]
> 
> 
> Regards,
> 
> 

-- 
Arnout Vandecappelle      arnout dot vandecappelle at essensium dot com
Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile)
Essensium, Mind division . . . . . . . . . . . . . . http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium . . . . . BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF



More information about the buildroot mailing list