--- linux/arch/i386/Makefile.orig 2002-10-12 08:28:31.000000000 +0530 +++ linux/arch/i386/Makefile 2002-10-12 08:41:23.000000000 +0530 @@ -43,19 +43,19 @@ endif ifdef CONFIG_M586MMX -CFLAGS += -march=i586 +CFLAGS += $(shell if $(CC) -march=pentium-mmx -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=pentium-mmx"; else echo "-march=i586"; fi) endif ifdef CONFIG_M686 -CFLAGS += -march=i686 +CFLAGS += $(shell if $(CC) -march=pentium2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=pentium2"; else echo "-march=i686"; fi) endif ifdef CONFIG_MPENTIUMIII -CFLAGS += -march=i686 +CFLAGS += $(shell if $(CC) -march=pentium3 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=pentium3"; else echo "-march=i686"; fi) endif ifdef CONFIG_MPENTIUM4 -CFLAGS += -march=i686 +CFLAGS += $(shell if $(CC) -march=pentium4 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=pentium4"; else echo "-march=i686"; fi) endif ifdef CONFIG_MK6 @@ -63,7 +63,7 @@ endif ifdef CONFIG_MK7 -CFLAGS += -march=i686 -malign-functions=4 +CFLAGS += $(shell if $(CC) -march=athlon -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=athlon"; else echo "-march=i686 -malign-functions=4"; fi) endif ifdef CONFIG_MCRUSOE