Re: 2.2.13 & gcc-2.95.1

Mikael Pettersson (mikpe@csd.uu.se)
Sat, 18 Sep 1999 18:03:54 +0200 (MET DST)


This patch for 2.2.x (originally by Artur Skawina for 2.3.x)
eliminates at least one problem of using gcc-2.95, namely its
utterly stupid and unnecessary 16-byte stack alignment default.
(My 2.2.12 and 2.2.13pre9 kernels are compiled with gcc-2.95.1
and this patch, and they work fine.)

/Mikael

--- linux-2.2.13-pre9/arch/i386/Makefile.orig Sat Sep 18 13:24:45 1999
+++ linux-2.2.13-pre9/arch/i386/Makefile Sat Sep 18 13:28:56 1999
@@ -23,6 +23,9 @@
CFLAGS_NSR := -fno-strength-reduce
CFLAGS := $(CFLAGS) $(CFLAGS_PIPE) $(CFLAGS_NSR)

+# 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)
+
ifdef CONFIG_M386
CFLAGS := $(CFLAGS) -m386 -DCPU=386
endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/