lkml.org 
[lkml]   [2000]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.2.18pre12 fix for some distros
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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.101 / U:4.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site