[U-Boot] [PATCH 1/2] common: Add CCACHE variable to allow use of ccache

Marek Vasut marex at denx.de
Tue May 21 17:04:53 CEST 2013


Dear Wolfgang Denk,

> Dear Marek Vasut,
> 
> In message <1369070715-9585-2-git-send-email-marex at denx.de> you wrote:
> > Prefix HOSTCC and CC with CCACHE variable to allow easy use of ccache.
> > In case the user wants to use ccache, exporting CCACHE=ccache will do
> > the trick. It is of course possible to either make the cross-compiler
> > name into a shellscript which invokes the ccache and the compiler, but
> > setting this variable makes use of ccache easier and more convenient.
> 
> ...
> 
> > -AS	= $(CROSS_COMPILE)as
> > +AS	= $(CCACHE) $(CROSS_COMPILE)as
> > 
> >  # Always use GNU ld
> >  LD	= $(shell if $(CROSS_COMPILE)ld.bfd -v > /dev/null 2>&1; \
> >  
> >  		then echo "$(CROSS_COMPILE)ld.bfd"; else echo 
"$(CROSS_COMPILE)ld";
> >  		fi;)
> > 
> > -CC	= $(CROSS_COMPILE)gcc
> > +CC	= $(CCACHE) $(CROSS_COMPILE)gcc
> > 
> >  CPP	= $(CC) -E
> 
> Why not for CPP ?

CPP is invoked via $(CC) -E and CCACHE is set for CC right above, so that'd call 
ccache twice.

Best regards,
Marek Vasut


More information about the U-Boot mailing list