From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, 1/2] common: Add CCACHE variable to allow use of ccache
Date: Wed, 21 Aug 2013 16:39:46 -0700 [thread overview]
Message-ID: <52154FC2.7080203@freescale.com> (raw)
In-Reply-To: <1369070715-9585-2-git-send-email-marex@denx.de>
On 05/20/2013 10:25 AM, Marek Vasut 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.
>
> Using ccache becomes convenient when using MAKEALL for large build
> tests, where the speedup after building the cache for the first time
> is about 4-6 times.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Tom Rini <trini@ti.com>
>
> ---
> config.mk | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/config.mk b/config.mk
> index 1fd109f..d59ded2 100644
> --- a/config.mk
> +++ b/config.mk
> @@ -98,6 +98,8 @@ else
> HOSTCC = gcc
> endif
>
> +HOSTCC := $(CCACHE) $(HOSTCC)
> +
> ifeq ($(HOSTOS),cygwin)
> HOSTCFLAGS += -ansi
> endif
> @@ -140,13 +142,13 @@ binutils-version = $(shell $(SHELL) $(SRCTREE)/tools/binutils-version.sh $(AS))
> #
> # Include the make variables (CC, etc...)
> #
> -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
> AR = $(CROSS_COMPILE)ar
> NM = $(CROSS_COMPILE)nm
> @@ -320,7 +322,7 @@ endif
>
> #########################################################################
>
> -export HOSTCC HOSTCFLAGS HOSTLDFLAGS PEDCFLAGS HOSTSTRIP CROSS_COMPILE \
> +export HOSTCC HOSTCFLAGS HOSTLDFLAGS PEDCFLAGS HOSTSTRIP CROSS_COMPILE CCACHE \
> AS LD CC CPP AR NM STRIP OBJCOPY OBJDUMP MAKE
> export CONFIG_SYS_TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS
>
>
Where did this patch go? I found it useful.
York
next prev parent reply other threads:[~2013-08-21 23:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-20 17:25 [U-Boot] [PATCH 0/2] Add ccache support Marek Vasut
2013-05-20 17:25 ` [U-Boot] [PATCH 1/2] common: Add CCACHE variable to allow use of ccache Marek Vasut
2013-05-21 12:39 ` Wolfgang Denk
2013-05-21 15:04 ` Marek Vasut
2013-08-21 23:39 ` York Sun [this message]
2013-08-22 2:51 ` [U-Boot] [U-Boot, " Marek Vasut
2013-08-22 3:42 ` sun york-R58495
2013-08-22 5:02 ` Marek Vasut
2013-08-22 5:45 ` sun york-R58495
2013-08-22 5:54 ` sun york-R58495
2013-08-22 19:36 ` Marek Vasut
2013-08-23 0:05 ` York Sun
2013-08-23 3:05 ` Marek Vasut
2013-08-23 20:19 ` York Sun
2013-05-20 17:25 ` [U-Boot] [PATCH 2/2] common: Use separate dirs for each board for ccache Marek Vasut
2013-05-20 18:09 ` Marek Vasut
2013-05-21 12:45 ` Wolfgang Denk
2013-05-21 15:05 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52154FC2.7080203@freescale.com \
--to=yorksun@freescale.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.