From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 21 May 2013 17:04:53 +0200 Subject: [U-Boot] [PATCH 1/2] common: Add CCACHE variable to allow use of ccache In-Reply-To: <20130521123952.E831A384809@gemini.denx.de> References: <1369070715-9585-1-git-send-email-marex@denx.de> <1369070715-9585-2-git-send-email-marex@denx.de> <20130521123952.E831A384809@gemini.denx.de> Message-ID: <201305211704.54068.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wolfgang Denk, > Dear Marek Vasut, > > In message <1369070715-9585-2-git-send-email-marex@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