arch: arm: set the architecture via Kconfig
Currently the build system has hardcoded values for the -march/-mcpu which identify what architecture should be used when compiling ARM code. For processors such as the STM32 this will need to be defined by a per SOC process. Change-Id: Ia8158cd687d8d0432ea420e204bb2bc67d33a054 Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
This commit is contained in:
parent
baddeadda1
commit
3f6884902b
4 changed files with 9 additions and 7 deletions
|
@ -7,6 +7,12 @@ cflags-$(CONFIG_LTO) += $(call cc-option,-flto,)
|
|||
KBUILD_CFLAGS += $(cflags-y)
|
||||
KBUILD_CXXFLAGS += $(cflags-y)
|
||||
|
||||
ifeq ($(CONFIG_CPU_CORTEX_M3),y)
|
||||
arch-cflags += $(call cc-option, -mthumb -mcpu=cortex-m3)
|
||||
else ifeq ($(CONFIG_CPU_CORTEX_M4),y)
|
||||
arch-cflags += $(call cc-option, -mthumb -mcpu=cortex-m4)
|
||||
endif
|
||||
|
||||
QEMU_CPU_TYPE_arm = cortex-m3
|
||||
QEMU_FLAGS_arm = -cpu $(QEMU_CPU_TYPE_arm) \
|
||||
-machine lm3s6965evb -nographic
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue