kbuild: Move CONFIG_STACK_CANARIES check

This patch moves the CONFIG_STACK_CANARIES check from architecture's
Makefile to the root Makefile since this option is kernel-related,
not architecture-related. This way we avoid replicating the same
CONFIG_STACK_CANARIES check in several Makefiles.

This patch also removes some blank lines from the Makefiles it touches.

Change-Id: I458f92fa6799526c608369d1e56579936bcb196e
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
This commit is contained in:
Andre Guedes 2016-01-07 14:21:22 -02:00 committed by Anas Nashif
commit 1622e4f4b5
4 changed files with 6 additions and 26 deletions

View file

@ -1,5 +1,3 @@
KBUILD_CFLAGS += $(call cc-option,-ffunction-sections,) $(call cc-option,-fdata-sections,)
arch-$(CONFIG_CPU_CORTEX_M3) += $(call cc-option,-mthumb -mcpu=cortex-m3) \
@ -9,16 +7,9 @@ arch-$(CONFIG_CPU_CORTEX_M4) += $(call cc-option,-mthumb -mcpu=cortex-m4) \
cflags-$(CONFIG_LTO) = $(call cc-option,-flto,)
ifeq ($(CONFIG_STACK_CANARIES),y)
cflags-y += $(call cc-option,-fstack-protector-all,)
else
cflags-y += $(call cc-option,-fno-stack-protector,)
endif
KBUILD_CFLAGS += $(cflags-y) $(arch-y)
KBUILD_AFLAGS += $(arch-y)
QEMU_CPU_TYPE_arm = cortex-m3
QEMU_FLAGS_arm = -cpu $(QEMU_CPU_TYPE_arm) \
-machine lm3s6965evb -nographic