Re: [PATCH] [5/5] kbuild: Set -fconserve-stack option for gcc 4.5

From: Sam Ravnborg
Date: Sat Sep 19 2009 - 05:20:20 EST


On Mon, Sep 14, 2009 at 02:36:15PM -0700, Andrew Morton wrote:
> On Mon, 14 Sep 2009 22:18:11 +0200 (CEST)
> Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
>
> >
> > The upcomming gcc 4.5 has a new -fconserve-stack option
> > that tells the inliner to take stack frame size in account.
> > Set it if the compiler supports it.
> >
> > Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> >
> > ---
> > Makefile | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > Index: linux-2.6.31-rc3-ak/Makefile
> > ===================================================================
> > --- linux-2.6.31-rc3-ak.orig/Makefile
> > +++ linux-2.6.31-rc3-ak/Makefile
> > @@ -575,6 +575,9 @@ KBUILD_CFLAGS += $(call cc-option,-fno-s
> > # revert to pre-gcc-4.4 behaviour of .eh_frame
> > KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
> >
> > +# conserve stack if available
> > +KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
>
> Do we have any info about what effects this option has upon the
> generated code? Text size changes, runtime stack usage changes, etc?

I merged this despite the relevant questions above was not answered.
But maybe we should wait until Andi gets back with numbers?

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