move cflags setting to arch/<arch>/Makefile
Move Zephyr specific CFLAGS that depend on config options to the Makefile where they can better be managed among other cflag options. Change-Id: Ia79a2f2def4f51857f6d661aa78e9fb7eb7a5e22 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
6f8d628d77
commit
1cc1ac4b2f
4 changed files with 19 additions and 11 deletions
|
@ -9,6 +9,12 @@ 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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue