]> git.sur5r.net Git - u-boot/commitdiff
arm: armv7m: Clean up some thumb / compiler flag options
authorTom Rini <trini@konsulko.com>
Tue, 8 May 2018 00:46:52 +0000 (20:46 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 23 May 2018 17:03:42 +0000 (13:03 -0400)
- The correct way to build with thumb mode is to select SYS_THUMB_BUILD
- We should be setting -march=armv7-m in arch/arm/Makefile not the
  sub-config.mk file.

Signed-off-by: Tom Rini <trini@konsulko.com>
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/cpu/armv7m/config.mk

index d273294afd953fd7ed1fd293a3e4e53ac6835a7d..0d1802b9f9595d41a3743afe87db55de9273a7e7 100644 (file)
@@ -221,6 +221,7 @@ config CPU_V7M
        select THUMB2_KERNEL
        select SYS_CACHE_SHIFT_5
        select SYS_ARM_MPU
+       select SYS_THUMB_BUILD
 
 config CPU_V7R
        bool
index 4d6d27613771edeec0899e70ac881b002401f1c7..680c6e8516dcd2fac29b09ea9e222be06fb248c7 100644 (file)
@@ -16,6 +16,7 @@ arch-$(CONFIG_CPU_ARM1136)    =-march=armv5
 arch-$(CONFIG_CPU_ARM1176)     =-march=armv5t
 arch-$(CONFIG_CPU_V7A)         =$(call cc-option, -march=armv7-a, \
                                 $(call cc-option, -march=armv7, -march=armv5))
+arch-$(CONFIG_CPU_V7M)         =-march=armv7-m
 arch-$(CONFIG_CPU_V7R)         =-march=armv7-r
 arch-$(CONFIG_ARM64)           =-march=armv8-a
 
index 4e46df5a2844b8fc4adfca02fd859c9bd4384ef7..f50964cfb92ea64f80466aa04ef586682ddd235f 100644 (file)
@@ -3,4 +3,4 @@
 # (C) Copyright 2015
 # Kamil Lulko, <kamil.lulko@gmail.com>
 
-PLATFORM_CPPFLAGS += -march=armv7-m -mthumb -mno-unaligned-access
+PLATFORM_CPPFLAGS += -mno-unaligned-access