Re: PATCH 2.4.14 mregparm=3 compilation fixes

Keith Owens
2001-11-12T16:10:38Z

On Mon, 12 Nov 2001 12:28:33 +0100,
Martin Dalecki <dalecki@evision-ventures.com> wrote:
>diff -ur linux-2.4.14-2/arch/i386/Makefile linux-mdcki/arch/i386/Makefile
>--- linux-2.4.14-2/arch/i386/Makefile Thu Apr 12 21:20:31 2001
>+++ linux-mdcki/arch/i386/Makefile Sat Nov 10 00:07:17 2001
>@@ -21,7 +21,7 @@
> LDFLAGS=-e stext
> LINKFLAGS =-T $(TOPDIR)/arch/i386/vmlinux.lds $(LDFLAGS)
>
>-CFLAGS += -pipe
>+CFLAGS += -freg-struct-return -mregparm=3
>
> # 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)

Setting mregparm must be a CONFIG_ option, with a huge warning that

A) Changing CONFIG_MREGPARM requires make mrproper.

B) Loading binary only modules into a kernel compiled with mregparm is
even more likely to destroy your kernel.