lkml.org 
[lkml]   [2000]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] further ruminations on 2.2.18-pre13 $(CC) definition
From

[AC]
> o Fix the 'which' compiler stuff (Horst von Brand,
> Peter Samuelson)
> | Can someone verify for me this works on Slackware and
> | on Caldera ?

It has been said that at least one version of Slackware has the 'which
reports errors to stdout' bug. So I think we need to return to an ugly
yet robust version.

Note that this patch also uses ':=' instead of '='. The latter has the
unpleasant effect of evaluating the shell expression every time $(CC)
is referenced, whereas the former just assigns it a fixed value once.
To be honest, the whole series of variables should use ':=', but it
doesn't really matter for the others.

Peter

--- 2.2.18-13/Makefile~ Sat Sep 30 19:32:29 2000
+++ 2.2.18-13/Makefile Sat Sep 30 19:40:50 2000
@@ -22,9 +22,10 @@

AS =$(CROSS_COMPILE)as
LD =$(CROSS_COMPILE)ld
-CC =$(shell if [ -n "$(CROSS_COMPILE)" ]; then echo $(CROSS_COMPILE)cc; else \
- which gcc272 2>/dev/null || which kgcc 2>/dev/null || echo cc; fi) \
- -D__KERNEL__ -I$(HPATH)
+CC := $(shell if [ -n "$(CROSS_COMPILE)" ]; then echo $(CROSS_COMPILE)cc; \
+ elif which gcc272 >/dev/null 2>&1; then echo gcc272; \
+ elif which kgcc >/dev/null 2>&1; then echo kgcc; \
+ else echo cc; fi) -D__KERNEL__ -I$(HPATH)
#CC =$(CROSS_COMPILE)cc -D__KERNEL__ -I$(HPATH)
CPP =$(CC) -E
AR =$(CROSS_COMPILE)ar
-
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/
\
 
 \ /
  Last update: 2005-03-22 12:45    [from the cache]
©2003-2011 Jasper Spaans