[OE-core] [PATCH 1/2] feature-arm-thumb.inc: Use thumb instruction by default if TUNE_FEATURES thumb

Andrei Gherzan andrei at gherzan.ro
Sat Jan 11 15:08:18 UTC 2014


Avoid a confusion when including thumb in TUNE_FATURES. In the curent behavior,
if I include thumb in TUNE_FATURES, ARM_THUMB_M_OPT will be "-marm" which makes
no sense for me as a default behavior. Obviously I can change this by using
ARM_INSTRUCTION_SET = thumb. But this seems strange and confusing. So let's do
it the other way around: have thumb instructions as default when TUNE_FATURES
contains "thumb" and switch to "arm" instructions when ARM_INSTRUCTION_SET is
"arm".

Signed-off-by: Andrei Gherzan <andrei at gherzan.ro>
---
 meta/conf/machine/include/arm/feature-arm-thumb.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/machine/include/arm/feature-arm-thumb.inc b/meta/conf/machine/include/arm/feature-arm-thumb.inc
index bd754be..259f7fe 100644
--- a/meta/conf/machine/include/arm/feature-arm-thumb.inc
+++ b/meta/conf/machine/include/arm/feature-arm-thumb.inc
@@ -5,7 +5,7 @@
 # but requires more instructions (140% for 70% smaller code) so may be
 # slower.
 TUNEVALID[thumb] = "Use thumb instructions instead of ARM"
-ARM_THUMB_M_OPT = "${@['-marm', '-mthumb'][d.getVar('ARM_INSTRUCTION_SET', True) == 'thumb']}"
+ARM_THUMB_M_OPT = "${@['-mthumb', '-marm'][d.getVar('ARM_INSTRUCTION_SET', True) == 'arm']}"
 TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "thumb", " ${ARM_THUMB_M_OPT}", "", d)}"
 OVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "thumb", ":thumb", "", d)}"
 
-- 
1.8.1.4




More information about the Openembedded-core mailing list