Re: 2.2.18pre12 fix for some distros

From: Peter Samuelson (peter@cadcamlab.org)
Date: Sat Sep 30 2000 - 01:22:17 EST


[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/



This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 21:00:26 EST