Skip to contentSkip to conversation

Linux 2.2.19pre7

DISCUSSION Pete Zaitcev 3 participants 3 messages Jan 9, 2001 – Jan 10, 2001 Kbuild

lore
Share & tools
lore
#0 lore raw
Quoted 1 line

o Fix kwhich versus old bash (Pete Zaitcev)

A small clarification may be in order here.

First, this patch comes from Miquel Smoorenburg, not from me.

Second, DaveM pointed out that it fixes a non-problem. I stepped on a bug with an obscure kernel, I think it was 2.2.18-pre3, which called kwhich with several arguments. Current kernels call kwhich with one argument at a time, so they are not affected.

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

#1 lore raw

In article <[email protected]>,

Quoted 7 lines · Pete Zaitcev
Quoted 1 line

o Fix kwhich versus old bash (Pete Zaitcev)

DaveM pointed out that it fixes a non-problem.
I stepped on a bug with an obscure kernel, I think it was 2.2.18-pre3, which called kwhich with several arguments. Current kernels call kwhich with one argument at a time, so they are not affected.

Yes, but I think it simply puts something right that might be wrong or at least less portable. So it's correct. Also calling kwhich with multiple arguments was actually the idea behind the script. Oh well, as long as it works ...

Mike.
-
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/

#2 lore raw
In reply to Pete Zaitcev

[Mike van Smoorenburg]

Quoted 2 lines

Also calling kwhich with multiple arguments was actually the idea behind the script.

Yes, and that's why my optimization patch (in 2.2.19pre3, since reverted) broke -- it relied on multiple arguments.

Alan, could you put it back in now?

Peter

Makefile renamed from Makefile~ +5 -3
@@ -24,12 +24,14 @@
 LD	=$(CROSS_COMPILE)ld
 #
 #	foo-bar-gcc for cross builds
-#	gcc272 for Debian's old compiler for kernels
 #	kgcc for Conectiva, Mandrake and Red Hat 7
+#	gcc272 for Debian
 #	otherwise 'cc'
 #
-CC	=$(shell if [ -n "$(CROSS_COMPILE)" ]; then echo $(CROSS_COMPILE)gcc; else \
-	$(CONFIG_SHELL) scripts/kwhich gcc272 2>/dev/null || $(CONFIG_SHELL) scripts/kwhich kgcc 2>/dev/null || echo cc; fi) \
+CCFOUND :=$(shell $(CONFIG_SHELL) scripts/kwhich kgcc gcc272 cc gcc)
+## Better, but requires GNU make 3.78
+##CC	=$(if $(CROSS_COMPILE),$(CROSS_COMPILE)gcc,$(CCFOUND)) -D__KERNEL__ -I$(HPATH)
+CC	=$(shell if [ -n "$(CROSS_COMPILE)" ]; then echo $(CROSS_COMPILE)gcc; else echo $(CCFOUND); fi) \
 	-D__KERNEL__ -I$(HPATH)
 CPP	=$(CC) -E
 AR	=$(CROSS_COMPILE)ar

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