From 77087102294fd6820f6a679a11b030099d0c6553 Mon Sep 17 00:00:00 2001 From: Benjamin Walsh Date: Thu, 10 Mar 2016 16:29:22 -0500 Subject: [PATCH] Revert "arch: arm: set the architecture via Kconfig" This reverts commit 3f6884902b7e3cd780ac3e99d381c5fab1fe0e71. This commit does not work as intended: the part in arch/arm/Makefile gets ignored and -mcpu=cortex-m3/4 does not get passed to gcc. It seems that the zephyr toolchain does not care, but the vxworks assembler chokes if it is missing, and thinks the CPU does not support thumb ISA Change-Id: I14d11d3e22dac4952bdab3eb9e2d1c36b1a686c2 Signed-off-by: Benjamin Walsh --- arch/arm/Makefile | 6 ------ arch/arm/soc/atmel_sam3/Makefile | 3 ++- arch/arm/soc/fsl_frdm_k64f/Makefile | 4 +++- arch/arm/soc/ti_lm3s6965/Makefile | 3 ++- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index fea5aad2899..8a8ef40eac9 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -7,12 +7,6 @@ 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 diff --git a/arch/arm/soc/atmel_sam3/Makefile b/arch/arm/soc/atmel_sam3/Makefile index 494d173d025..e7d49489052 100644 --- a/arch/arm/soc/atmel_sam3/Makefile +++ b/arch/arm/soc/atmel_sam3/Makefile @@ -1,5 +1,6 @@ -arch-cflags += $(call cc-option,-mthumb -march=armv7-m) +arch-cflags += $(call cc-option,-mthumb -mcpu=cortex-m3) \ + $(call cc-option,-mthumb -march=armv7-m) KBUILD_AFLAGS += $(arch-cflags) KBUILD_CXXFLAGS += $(arch-cflags) diff --git a/arch/arm/soc/fsl_frdm_k64f/Makefile b/arch/arm/soc/fsl_frdm_k64f/Makefile index f4580b66072..5ebdf2eba72 100644 --- a/arch/arm/soc/fsl_frdm_k64f/Makefile +++ b/arch/arm/soc/fsl_frdm_k64f/Makefile @@ -1,5 +1,7 @@ -arch-cflags = $(call cc-option,-mthumb -march=armv7e-m) + +arch-cflags = $(call cc-option,-mthumb -mcpu=cortex-m4) \ + $(call cc-option,-mthumb -march=armv7e-m) KBUILD_CFLAGS += $(arch-cflags) KBUILD_CXXFLAGS += $(arch-cflags) diff --git a/arch/arm/soc/ti_lm3s6965/Makefile b/arch/arm/soc/ti_lm3s6965/Makefile index bfb20a7a1e0..670a9815b22 100644 --- a/arch/arm/soc/ti_lm3s6965/Makefile +++ b/arch/arm/soc/ti_lm3s6965/Makefile @@ -1,5 +1,6 @@ -arch-cflags = $(call cc-option,-mthumb -march=armv7-m) +arch-cflags = $(call cc-option,-mthumb -mcpu=cortex-m3) \ + $(call cc-option,-mthumb -march=armv7-m) KBUILD_CFLAGS += $(arch-cflags) KBUILD_CXXFLAGS += $(arch-cflags)