diff -Nru a/arch/i386/Makefile b/arch/i386/Makefile --- a/arch/i386/Makefile Mon Feb 17 13:35:18 2003 +++ b/arch/i386/Makefile Mon Feb 17 13:35:18 2003 @@ -23,8 +23,10 @@ CFLAGS += -pipe +check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi) + # prevent gcc from keeping the stack 16 byte aligned -CFLAGS += $(shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; fi) +CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,) ifdef CONFIG_M386 CFLAGS += -march=i386 @@ -83,7 +85,8 @@ endif ifdef CONFIG_MCYRIXIII -CFLAGS += -march=i486 -malign-functions=0 -malign-jumps=0 -malign-loops=0 +CFLAGS += $(call check_gcc,-march=c3,-march=i486) +CFLAGS += $(call check_gcc,-falign-functions=0 -falign-jumps=0 -falign-loops=0,-malign-functions=0 -malign-jumps=0 -malign-loops=0) endif HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o