patch-2.3.41 linux/arch/i386/Makefile

Next file: linux/arch/i386/config.in
Previous file: linux/arch/arm/kernel/sys_arm.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.40/linux/arch/i386/Makefile linux/arch/i386/Makefile
@@ -22,7 +22,10 @@
 LINKFLAGS =-T $(TOPDIR)/arch/i386/vmlinux.lds $(LDFLAGS)
 
 CFLAGS_PIPE := -pipe
-CFLAGS_NSR  := -fno-strength-reduce
+
+# only work around strength reduction bug(s) on older gcc versions
+CFLAGS_NSR  := $(shell if $(CC) -march=i486 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo ""; else echo "-fno-strength-reduce"; fi)
+
 CFLAGS := $(CFLAGS) $(CFLAGS_PIPE) $(CFLAGS_NSR)
 
 # prevent gcc from keeping the stack 16 byte aligned
@@ -55,6 +58,12 @@
 CFLAGS := $(CFLAGS) -DCPU=686
 CFLAGS += $(shell if $(CC) -march=i686 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i686"; fi)
 AFLAGS := $(AFLAGS) -DCPU=686
+endif
+
+ifdef CONFIG_MK6
+CFLAGS := $(CFLAGS) -DCPU=586
+CFLAGS += $(shell if $(CC) -march=k6 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=k6"; fi)
+AFLAGS := $(AFLAGS) -DCPU=586
 endif
 
 ifdef CONFIG_MK7

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)