Move scripts/Makefile.<arch>preparch to arch/<arch>
Follow the model of the Linux kernel for adding arch specific CFLAGS by using the Makefile and Kbuild combination in the arch/<arch> directory. This will also allow adding architecture specific targets and is easy to maintain when alongside the architecture. Change-Id: If51a78e8845baa71d9090c4a4f49fcd013354840 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
fde80d7ead
commit
e3ac0907df
10 changed files with 87 additions and 82 deletions
|
@ -1,4 +1,21 @@
|
|||
obj-y = core/
|
||||
|
||||
obj-$(CONFIG_PLATFORM_FSL_FRDM_K64F) += platforms/fsl_frdm_k64f/
|
||||
obj-$(CONFIG_PLATFORM_TI_LM3S6965) += platforms/ti_lm3s6965/
|
||||
|
||||
KBUILD_CFLAGS += $(call cc-option,-ffunction-sections,) $(call cc-option,-fdata-sections,)
|
||||
|
||||
arch-$(CONFIG_CPU_CORTEX_M3) += $(call cc-option,-mthumb -mcpu=cortex-m3) \
|
||||
$(call cc-option,-mthumb -march=armv7-m)
|
||||
arch-$(CONFIG_CPU_CORTEX_M4) += $(call cc-option,-mthumb -mcpu=cortex-m4) \
|
||||
$(call cc-option,-mthumb -march=armv7e-m)
|
||||
|
||||
cflags-$(CONFIG_LTO) = $(call cc-option,-flto,)
|
||||
|
||||
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
|
||||
QEMU_arm = qemu-system-arm
|
||||
|
||||
export QEMU_FLAGS_arm QEMU_arm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue