summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2011-10-04 10:12:25 +0100
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 12:09:22 -0700
commit679c50f9effbdf5bb7b783a5b8cc3619dca3b0da (patch)
tree9104026700f249d2adf447265360d8630b580515 /Makefile
parent74b3fbf378f5d64e807529deccaf485194e2c13f (diff)
Disable -fconserve-stack on ARM v2
There are reports that -fconserve-stack misaligns variables on the stack. Disable it for ARM to work around this gcc bug. v2: Move top level flags definition up Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Rebase-Id: R3c09c871e91c8fa5d007ab2d826064d8e859992e
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index b119684ddb2d..4d6b136490b7 100644
--- a/Makefile
+++ b/Makefile
@@ -576,6 +576,10 @@ else
KBUILD_CFLAGS += -O2
endif
+# conserve stack if available
+# do this early so that an architecture can override it.
+KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
+
include $(srctree)/arch/$(SRCARCH)/Makefile
ifdef CONFIG_READABLE_ASM
@@ -656,9 +660,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign)
# disable invalid "can't wrap" optimizations for signed / pointers
KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
-# conserve stack if available
-KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
-
# use the deterministic mode of AR if available
KBUILD_ARFLAGS := $(call ar-option,D)