lkml.org 
[lkml]   [2000]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: 2.2.18pre12 fix for some distros
From

[AC]
> -CC =$(CROSS_COMPILE)$(shell if [ -n "`which gcc272 2>/dev/null`" ]; then echo "`which gcc272`";\
> - else if [ -n "`which kgcc 2>/dev/null`" ]; then echo "`which kgcc`"; else\
> +CC =$(CROSS_COMPILE)$(shell if [ -n "`which gcc272 >/dev/null 2>/dev/null`" ]; then echo "`which gcc272`";\
> + else if [ -n "`which kgcc >/dev/null 2>/dev/null`" ]; then echo "`which kgcc`"; else\

Two bugs. Horst found one, which is easily fixed by exorcising all
quote marks and if statements:

CC =$(CROSS_COMPILE)$(shell which gcc272 2>/dev/null || \
which kgcc 2>/dev/null || echo gcc) -D__KERNEL__ -I$(HPATH)

There is one bug left though. `which` gives an absolute path so
$(CROSS_COMPILE) is now useless. Try this instead:

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)/include

Note that we still win on punctuation and length.....

Peter
-
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:38    [W:0.131 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site