Skip to contentSkip to conversation

tune/armv7: Add -mthumb to TUNE_CCARGS

PATCH In review Khem Raj 3 participants 7 messages Mar 25, 2012 – Mar 26, 2012

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 tune/armv7: Add -mthumb to TUNE_CCARGS

armv7 is least common denominator of armv7-a armv7-m and armv7-r and armv7-m does not support ARM instructions but only thumb2 instruction set which means armv7 when chosen will complain if code is compiled in arm mode which is default in OE if not specified other wise

Fixes errors like below

error: target CPU does not support ARM mode

---
 meta/conf/machine/include/arm/arch-armv7.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/conf/machine/include/arm/arch-armv7.inc +1 -1
index 33d9f0d..563a6b4 100644
@@ -4,7 +4,7 @@ ARMPKGARCH ?= "armv7"
 
 TUNEVALID[armv7] = "Enable instructions for ARMv7"
 TUNE_CONFLICTS[armv7] = "armv4 armv5 armv6"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "armv7", "-march=armv7", "", d)}"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "armv7", "-march=armv7 -mthumb", "", d)}"
 MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "armv7", ":armv7", "" ,d)}"
 
 require conf/machine/include/arm/arch-armv6.inc
Signature · 1 line
1.7.9.1
#1 lore raw
Quoted 21 lines · Khem Raj

armv7 is least common denominator of armv7-a armv7-m and armv7-r and armv7-m does not support ARM instructions but only thumb2 instruction set which means armv7 when chosen will complain if code is compiled in arm mode which is default in OE if not specified other wise

Fixes errors like below

error: target CPU does not support ARM mode

---
 meta/conf/machine/include/arm/arch-armv7.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/conf/machine/include/arm/arch-armv7.inc +0 -0
index 33d9f0d..563a6b4 100644

meta/conf/machine/include/arm/arch-armv7.inc ARMPKGARCH ?= "armv7" · line 10

Quoted 8 lines
meta/conf/machine/include/arm/arch-armv7.inc +1 -1
@@ -4,7 +4,7 @@ ARMPKGARCH ?= "armv7"
 
 TUNEVALID[armv7] = "Enable instructions for ARMv7"
 TUNE_CONFLICTS[armv7] = "armv4 armv5 armv6"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "armv7", "-march=armv7", "", d)}"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "armv7", "-march=armv7 -mthumb", "", d)}"
 MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "armv7", ":armv7", "" ,d)}"
 
 require conf/machine/include/arm/arch-armv6.inc

Looking at this file, if the above is true and armv7 can't do anything other than thumb, shouldn't we just delete the non-thumb configurations for "armv7"?

Adding in "thumb" to the TUNE_FEATURES should add the -mthumb it needs to work.

Cheers,

Richard

#2 lore raw
Quoted 3 lines · Richard Purdie

Looking at this file, if the above is true and armv7 can't do anything other than thumb, shouldn't we just delete the non-thumb configurations for "armv7"?

It's not totally obvious to me that having a "lowest common denominator" configuration for ARMv7 is really all that valuable. In fact I would be slightly surprised if anybody is targetting ARMv7-M with OE at all. What's the use-case for that?

p.

#3 lore raw
Quoted 9 lines · Phil Blundell
Quoted 3 lines · Richard Purdie

Looking at this file, if the above is true and armv7 can't do anything other than thumb, shouldn't we just delete the non-thumb configurations for "armv7"?

It's not totally obvious to me that having a "lowest common denominator" configuration for ARMv7 is really all that valuable. In fact I would be slightly surprised if anybody is targetting ARMv7-M with OE at all. What's the use-case for that?

I have no idea, it appears the file doesn't make a lot of sense...

Cheers,

Richard

author
#4 lore raw
Quoted 6 lines · Richard Purdie
Quoted 5 lines · Phil Blundell
Quoted 3 lines · Richard Purdie

Looking at this file, if the above is true and armv7 can't do anything other than thumb, shouldn't we just delete the non-thumb configurations for "armv7"?

Quoted 7 lines
Quoted 4 lines

It's not totally obvious to me that having a "lowest common denominator" configuration for ARMv7 is really all that valuable.  In fact I would be slightly surprised if anybody is targetting ARMv7-M with OE at all. What's the use-case for that?

I have no idea, it appears the file doesn't make a lot of sense...

on second thought I think we should delete this tune file since its somewhat useless.

Quoted 9 lines

Cheers,

Richard

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#5 lore raw
Quoted 13 lines · Khem Raj
Quoted 11 lines · Richard Purdie
Quoted 9 lines · Phil Blundell
Quoted 3 lines · Richard Purdie

Looking at this file, if the above is true and armv7 can't do anything other than thumb, shouldn't we just delete the non-thumb configurations for "armv7"?

It's not totally obvious to me that having a "lowest common denominator" configuration for ARMv7 is really all that valuable. In fact I would be slightly surprised if anybody is targetting ARMv7-M with OE at all. What's the use-case for that?

Quoted 5 lines
Quoted 2 lines

I have no idea, it appears the file doesn't make a lot of sense...

on second thought I think we should delete this tune file since its somewhat useless.

Yes, agreed. It looks like Richard added it originally so, if he doesn't know ( / has forgotten) what it's good for I would guess that nobody does.

p.

#6 lore raw
Quoted 17 lines · Phil Blundell
Quoted 16 lines · Khem Raj
Quoted 13 lines · Richard Purdie
Quoted 9 lines · Phil Blundell
Quoted 3 lines · Richard Purdie

Looking at this file, if the above is true and armv7 can't do anything other than thumb, shouldn't we just delete the non-thumb configurations for "armv7"?

It's not totally obvious to me that having a "lowest common denominator" configuration for ARMv7 is really all that valuable. In fact I would be slightly surprised if anybody is targetting ARMv7-M with OE at all. What's the use-case for that?

I have no idea, it appears the file doesn't make a lot of sense...

Quoted 6 lines
Quoted 2 lines

on second thought I think we should delete this tune file since its somewhat useless.

Yes, agreed. It looks like Richard added it originally so, if he doesn't know ( / has forgotten) what it's good for I would guess that nobody does.

I was proxy for the tune file rewrite, I wasn't responsible for all the details. I'm find with removing it assuming nobody objects. I'm cc'ing Mark in case he remembers anything I don't.

Cheers,

Richard