2006-02-20 19:36:42

by Andy Whitcroft

[permalink] [raw]
Subject: [PATCH] remove ccache from top level Makefile and make configurable

remove ccache from top level Makefile and make configurable

[Here is the patch I used to fix this for out nightly testing.
It seems that if it were something we could configure from outside
the source we'd avoid this occuring again.]

Remove errant ccache from top-level makefile and make it configurable on
the kernel build line.

Signed-off-by: Andy Whitcroft <[email protected]>
---
Makefile | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
diff -upN reference/Makefile current/Makefile
--- reference/Makefile
+++ current/Makefile
@@ -171,9 +171,11 @@ SUBARCH := $(shell uname -m | sed -e s/i
# Alternatively CROSS_COMPILE can be set in the environment.
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
+# CCACHE specifies the name of a ccache binary to use with gcc.

ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
+CCACHE ?=

# Architecture as present in compile.h
UTS_MACHINE := $(ARCH)
@@ -274,7 +276,7 @@ include $(srctree)/scripts/Kbuild.inclu

AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
-CC = ccache $(CROSS_COMPILE)gcc
+CC = $(CCACHE) $(CROSS_COMPILE)gcc
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm


2006-02-20 21:39:50

by Chris Friesen

[permalink] [raw]
Subject: Re: [PATCH] remove ccache from top level Makefile and make configurable

Andy Whitcroft wrote:
> remove ccache from top level Makefile and make configurable

Isn't it already configurable?


> diff -upN reference/Makefile current/Makefile
> --- reference/Makefile
> +++ current/Makefile
> @@ -171,9 +171,11 @@ SUBARCH := $(shell uname -m | sed -e s/i
> # Alternatively CROSS_COMPILE can be set in the environment.
> # Default value for CROSS_COMPILE is not to prefix executables
> # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
> +# CCACHE specifies the name of a ccache binary to use with gcc.
>
> ARCH ?= $(SUBARCH)
> CROSS_COMPILE ?=
> +CCACHE ?=

This sets it to nothing if it isn't already set--seems like you should
be able to set it on the commandline or else it has no effect.

Chris

2006-02-21 18:40:31

by Andy Whitcroft

[permalink] [raw]
Subject: Re: [PATCH] remove ccache from top level Makefile and make configurable

Christopher Friesen wrote:
> Andy Whitcroft wrote:
>
>> remove ccache from top level Makefile and make configurable
>
> Isn't it already configurable?

Yes and no. You can specify CC, but you need to know the form of that
line. Ok, we do now but will be in the future. If it changes then the
semantics to use CCACHE would change. This seem like something to avoid.

>> diff -upN reference/Makefile current/Makefile
>> --- reference/Makefile
>> +++ current/Makefile
>> @@ -171,9 +171,11 @@ SUBARCH := $(shell uname -m | sed -e s/i
>> # Alternatively CROSS_COMPILE can be set in the environment.
>> # Default value for CROSS_COMPILE is not to prefix executables
>> # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
>> +# CCACHE specifies the name of a ccache binary to use with gcc.
>>
>> ARCH ?= $(SUBARCH)
>> CROSS_COMPILE ?=
>> +CCACHE ?=
>
>
> This sets it to nothing if it isn't already set--seems like you should
> be able to set it on the commandline or else it has no effect.

Yes this would really allow a subarch to set it if it wanted to, which
isn't likely to. It can probabally be killed.

-apw