diff mbox

[U-Boot,v3,4/6] armv7: Use -march=armv7-a and thereby enable Thumb-2

Message ID 1330005966-1444-4-git-send-email-aneesh@ti.com
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Aneesh V Feb. 23, 2012, 2:06 p.m. UTC
Enable -march=armv7-a for armv7 platforms if the tool-chain
supports it. This in turn results in Thumb-2 code generated
for these platforms if CONFIG_SYS_THUMB_BUILD is enabled.

Signed-off-by: Aneesh V <aneesh@ti.com>
---
I believe armv7-a is fine for all the SoCs except Tegra2
and I see that Tegra2 is already making the necessary
exception in .../armv7/tegra2/config.mk

Let me know if any other SoC has a problem with armv7-a

Changes from RFC to V1:
- Enabled armv7-a from armv7/config.mk instead of from
  omap config.mk files

Changes from V1 to V2:
- None
---
 arch/arm/cpu/armv7/config.mk |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Comments

Mike Frysinger Feb. 23, 2012, 3:05 p.m. UTC | #1
On Thursday 23 February 2012 09:06:04 Aneesh V wrote:
> --- a/arch/arm/cpu/armv7/config.mk
> +++ b/arch/arm/cpu/armv7/config.mk
> 
> -# Make ARMv5 to allow more compilers to work, even though its v7a.
> -PLATFORM_CPPFLAGS += -march=armv5
> +# If armv7-a is not supported by GCC fall-back to armv5, which is
> +# supported by more tool-chains
> +PLATFORM_CPPFLAGS += $(call cc-option, -march=armv7-a, -march=armv5)

NAK: you need to use ":=" before "+=":
	PF_CPPFLAGS_MARCH := $(call cc-option, -march=armv7-a, -march=armv5)
	PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_MARCH)
-mike
Aneesh V Feb. 23, 2012, 5:50 p.m. UTC | #2
On Thursday 23 February 2012 08:35 PM, Mike Frysinger wrote:
> On Thursday 23 February 2012 09:06:04 Aneesh V wrote:
>> --- a/arch/arm/cpu/armv7/config.mk
>> +++ b/arch/arm/cpu/armv7/config.mk
>>
>> -# Make ARMv5 to allow more compilers to work, even though its v7a.
>> -PLATFORM_CPPFLAGS += -march=armv5
>> +# If armv7-a is not supported by GCC fall-back to armv5, which is
>> +# supported by more tool-chains
>> +PLATFORM_CPPFLAGS += $(call cc-option, -march=armv7-a, -march=armv5)
>
> NAK: you need to use ":=" before "+=":
> 	PF_CPPFLAGS_MARCH := $(call cc-option, -march=armv7-a, -march=armv5)
> 	PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_MARCH)

Will do.

br,
Aneesh
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk
index 83ddf10..b66fb6f 100644
--- a/arch/arm/cpu/armv7/config.mk
+++ b/arch/arm/cpu/armv7/config.mk
@@ -22,8 +22,9 @@ 
 #
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
-# Make ARMv5 to allow more compilers to work, even though its v7a.
-PLATFORM_CPPFLAGS += -march=armv5
+# If armv7-a is not supported by GCC fall-back to armv5, which is
+# supported by more tool-chains
+PLATFORM_CPPFLAGS += $(call cc-option, -march=armv7-a, -march=armv5)
 # =========================================================================
 #
 # Supply options according to compiler version