Message ID | 20110528153417.GB25869@alboin.amr.corp.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sat, May 28, 2011 at 04:34:17PM +0100, Andi Kleen wrote: > 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 <ak@linux.intel.com> > > 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) Didn't work, on the gcc command line we get -fno-conserve-stack followed by -fconserve-stack from the top makefile and it seems that the latter takes priority.
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
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 <ak@linux.intel.com>