diff --git a/Makefile b/Makefile index 554683d..087e0c0 100644 --- a/Makefile +++ b/Makefile @@ -535,6 +535,9 @@ else KBUILD_CFLAGS += -O2 endif +# conserve stack if available +KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) + include $(srctree)/arch/$(SRCARCH)/Makefile ifneq ($(CONFIG_FRAME_WARN),0) @@ -579,9 +582,6 @@ KBUILD_CFLAGS += $(call cc-option,-Wno-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) - # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments # But warn user when we do so warn-assign = \ diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 767874d..89afaea 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -93,6 +93,11 @@ ifeq ($(CONFIG_ARM_UNWIND),y) CFLAGS_ABI +=-funwind-tables endif +ifeq ($(CONFIG_ALIGNMENT_TRAP),y) +CFLAGS_ABI +=$(call cc-option,-mno-unaligned-access,) +endif +KBUILD_CFLAGS += $(call cc-option,-fno-conserve-stack,) + ifeq ($(CONFIG_THUMB2_KERNEL),y) AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it) AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)