summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a2e69a08b7e6..aea3a3a16741 100644
--- a/Makefile
+++ b/Makefile
@@ -564,6 +564,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
ifneq ($(CONFIG_FRAME_WARN),0)
@@ -629,9 +633,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)