public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* CCFOUND and more
@ 2000-12-26 20:11 J . A . Magallon
  2000-12-28  4:22 ` Keith Owens
  0 siblings, 1 reply; 3+ messages in thread
From: J . A . Magallon @ 2000-12-26 20:11 UTC (permalink / raw)
  To: linux-kernel

Hi everyone.

Solving other things, I have realized that all that problem on fast
CC detection (CCFOUND) is easily solved by doing:
	CC  := $(.................)
instead of
	CC = $(.........)
The find of the suitable CC command is repeated many times along a 
kernel build. And CC is not anything that can change along a kernel
build. So former syntax solves all the problems, CC detection can
be so complex as you want because is done only once.

Same is valid for other Makefile variables:
CPP = $(CC) -E ===> CPP := $(CC) -E

(If you want to test how many shells are spawned when using CC, try
CC  = $(shell echo "===== CC EVAL ===============" >&2; if ........
vs
CC  := $(shell echo "===== CC EVAL ===============" >&2; if .......

Is there something I am missing ?

-- 
J.A. Magallon                                         $> cd pub
mailto:jamagallon@able.es                             $> more beer

Linux werewolf 2.2.19-pre3-aa2 #9 SMP Tue Dec 26 12:26:43 CET 2000 i686

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: CCFOUND and more
  2000-12-26 20:11 CCFOUND and more J . A . Magallon
@ 2000-12-28  4:22 ` Keith Owens
  2000-12-29  1:27   ` J . A . Magallon
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Owens @ 2000-12-28  4:22 UTC (permalink / raw)
  To: J . A . Magallon; +Cc: linux-kernel

On Tue, 26 Dec 2000 21:11:14 +0100, 
"J . A . Magallon" <jamagallon@able.es> wrote:
>Solving other things, I have realized that all that problem on fast
>CC detection (CCFOUND) is easily solved by doing:
>	CC  := $(.................)
>instead of
>	CC = $(.........)
>The find of the suitable CC command is repeated many times along a 
>kernel build. And CC is not anything that can change along a kernel
>build. So former syntax solves all the problems, CC detection can
>be so complex as you want because is done only once.
>
>Is there something I am missing ?

Yes.  Some arch files change CROSS_COMPILE after CC has been set and
expect the change to flow into the definition of CC.  This "feature"
only works because '=' stores the value as text and reevaluates the
text each time, automatically picking up any changes to CROSS_COMPILE.
Using CC := might break m68k and mips.  The makefile redesign for 2.5
will fix this problem once and for all.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: CCFOUND and more
  2000-12-28  4:22 ` Keith Owens
@ 2000-12-29  1:27   ` J . A . Magallon
  0 siblings, 0 replies; 3+ messages in thread
From: J . A . Magallon @ 2000-12-29  1:27 UTC (permalink / raw)
  To: Keith Owens; +Cc: linux-kernel


On 2000.12.28 Keith Owens wrote:
> 
> Yes.  Some arch files change CROSS_COMPILE after CC has been set and
> expect the change to flow into the definition of CC.  This "feature"
> only works because '=' stores the value as text and reevaluates the
> text each time, automatically picking up any changes to CROSS_COMPILE.
> Using CC := might break m68k and mips.  The makefile redesign for 2.5
> will fix this problem once and for all.
> 

OK, understrood. Anyway, I know there is not too much impact of this
issue, but you could always convert-to-fast-version the more
critical vars with something like:

CC = .........
CPP = $(CC) -E
..
include arch/$(ARCH)/Makefile

# Eval them once forever
CC:=$(CC)
CPP:=$(CPP)


-- 
J.A. Magallon                                         $> cd pub
mailto:jamagallon@able.es                             $> more beer

Linux werewolf 2.2.19-pre3-aa3 #3 SMP Wed Dec 27 10:25:32 CET 2000 i686

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-12-29  1:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-26 20:11 CCFOUND and more J . A . Magallon
2000-12-28  4:22 ` Keith Owens
2000-12-29  1:27   ` J . A . Magallon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox