On Sat, Sep 30, 2000 at 01:16:21AM +0100, Alan Cox wrote:
> -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\

Doesn't work here in a couple of Slackware systems (I don't remember version
numbers). 'which' seems to print the error message to stdout, not stderr so
the compiler of choice will be 'which: no gcc272 in 
(/bin:/usr/bin:/usr/X11/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin)'

How about something like

CC      =$(CROSS_COMPILE)$(shell if [ -x /usr/bin/gcc272 -o -x /usr/local/bin/gcc272 
]; then echo "gcc272"; \
        else  if [ -x /usr/bin/kgcc -o -x /usr/local/bin/kgcc ]; then echo "kgcc"; \
        else  echo "cc"; fi ; fi) -D__KERNEL__ -I$(HPATH)

Or wherever kgcc and gcc272 are installed in those systems where they have
them.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to