Messages in this thread |  | | Date | Sat, 30 Sep 2000 11:56:35 +0300 | From | Petri Kaukasoina <> | Subject | Re: 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/
|  |