[Buildroot] [PATCH v2 04/18] infra: move ccache handling to the toolchain wrapper

Peter Korsgaard peter at korsgaard.com
Sun Oct 4 15:07:44 UTC 2015


>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be> writes:

 > Since we always have a toolchain wrapper now, we can move the ccache
 > call to the toolchain wrapper.

 > The hostcc ccache handling obviously stays.

 > The global addition of ccache to TARGET_CC/CXX is removed, but many
 > individual packages and infras still add it. This means we have a
 > chain like this: ccache -> toolchain-wrapper -> ccache -> gcc
 > However, this is fairly harmless: for cache misses, the inner ccache
 > just adds overhead and for cache hits, the inner ccache is never
 > called. Later patches will remove these redundant ccache calls.

 > As a side effect, perl now supports ccache as well.

 > Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
 > Cc: Danomi Manchego <danomimanchego123 at gmail.com>
 > Cc: Károly Kasza <kaszak at gmail.com>
 > Reviewed-by: Romain Naour <romain.naour at openwide.fr>

> +++ b/toolchain/toolchain-wrapper.mk
 > @@ -16,6 +16,10 @@ TOOLCHAIN_WRAPPER_ARGS += -DBR_SYSROOT='"$(STAGING_SUBDIR)"'
 >  # separate argument when used in execv() by the toolchain wrapper.
 >  TOOLCHAIN_WRAPPER_ARGS += -DBR_ADDITIONAL_CFLAGS='$(foreach f,$(call qstrip,$(BR2_TARGET_OPTIMIZATION)),"$(f)",)'
 
 > +ifeq ($(BR2_CCACHE),y)
 > +TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE='"$(CCACHE)"'
 > +endif

As I just mentioned IRL, CCACHE is $(HOST_DIR)/usr/bin/ccache, E.G the
absolute path to ccache - So hardcoding this in the wrapper isn't really
nice for relocatable SDK.

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list