Skip to contentSkip to conversation

kbuild: set -fconserve-stack option for gcc 4.5

PATCH In review [email protected] 1 participant 1 message Sep 18, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 18/18 kbuild: set -fconserve-stack option for gcc 4.5

From: Andi Kleen <[email protected]>

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.

---

 Makefile |    3 +++
 1 file changed, 3 insertions(+)
Makefile renamed from Makefile~kbuild-set-fconserve-stack-option-for-gcc-45 +3 -0
diff -puN Makefile~kbuild-set-fconserve-stack-option-for-gcc-45 Makefile
@@ -573,6 +573,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)
+
 # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
 # But warn user when we do so
 warn-assign = \

_