Thread (5 messages) flat view 5 messages, 3 authors, 2011-06-02
STALE5575d

[PATCH] Disable -fconserve-stack on ARM

From: Andi Kleen <hidden>
Date: 2011-05-28 15:34:21
Also in: lkml
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

Here's a untested but straight forward patch to disable it.
-Andi

---

Disable -fconserve-stack on ARM

There are reports that -fconserve-stack misaligns variables on the stack.
Disable it for ARM to work around this gcc bug.

Signed-off-by: Andi Kleen <redacted>
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 25750bc..0883cff 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -41,6 +41,10 @@ ifeq ($(CONFIG_CC_STACKPROTECTOR),y)
 KBUILD_CFLAGS	+=-fstack-protector
 endif
 
+# ARM gcc developers unfortunately broke -fconserve-stack. It misaligns
+# variables on the stack
+KBUILD_CFLAGS += $(call cc-option,-fno-conserve-stack)
+
 ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
 KBUILD_CPPFLAGS	+= -mbig-endian
 AS		+= -EB
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help