kbuild: Specify -march when using ARM cortex-m3/m4

Some compilers default to a value for -march that is incompatible with the
specified -mcpu setting.

Change-Id: Id94fc6666efe86ab511cf2320bf07b2eb70d72ce
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
Peter Mitsis 2015-06-01 14:47:07 -04:00 committed by Anas Nashif
commit 28846dbf82

View file

@ -2,10 +2,10 @@ LTO_FLAG-y = $(call cc-option,-flto,)
SECTION_GC_FLAG = $(call cc-option,-ffunction-sections,) $(call cc-option,-fdata-sections,)
arm_FLAGS = $(call cc-option,-mthumb,)
ifeq ($(CONFIG_CPU_CORTEXM3),y)
arm_FLAGS += -mcpu=cortex-m3
arm_FLAGS += -mcpu=cortex-m3 -march=armv7-m
endif
ifeq ($(CONFIG_CPU_CORTEXM4),y)
arm_FLAGS += -mcpu=cortex-m4
arm_FLAGS += -mcpu=cortex-m4 -march=armv7e-m
endif
arm_FLAGS += -DVXMICRO_ARCH_arm
arm_FLAGS += -DVXMICRO_ARCH=arm