]> code.ossystems Code Review - openembedded-core.git/commitdiff
feature-arm-thumb: respect ARM_INSTRUCTION_SET
authorMartin Jansa <martin.jansa@gmail.com>
Sat, 30 Jul 2011 01:04:33 +0000 (01:04 +0000)
committerKhem Raj <raj.khem@gmail.com>
Fri, 29 Jul 2011 17:18:15 +0000 (10:18 -0700)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
meta/conf/machine/include/arm/feature-arm-thumb.inc

index b5801687fa14f088a5fae9b213730bb57f626010..e7d392e95a35d4c2bdac6ccecc425b74d5a5978e 100644 (file)
@@ -5,7 +5,8 @@
 # but requires more instructions (140% for 70% smaller code) so may be
 # slower.
 TUNEVALID[thumb] = "Use thumb instructions instead of ARM"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "thumb", "-mthumb", "-mno-thumb", d)}"
+ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "thumb", "${ARM_THUMB_M_OPT}", "${ARM_THUMB_M_OPT}", d)}"
 OVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "thumb", ":thumb", "", d)}"
 
 # Note armv7 will hit on armv7a as well