[OE-core] [PATCH][RFC][WIP 4/6] feature-arm-thumb.inc, arch-armv4.inc: Add "arm" to TUNE_FEATURES
Martin Jansa
martin.jansa at gmail.com
Wed Jan 22 00:36:09 UTC 2014
* it will be inherited by all higher architectures, except few exceptions which
support only thumb and not arm
* respect missing "arm" in TUNE_FEATURES in feature-arm-thumb.inc
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
meta/conf/machine/include/arm/arch-armv4.inc | 2 +-
meta/conf/machine/include/arm/feature-arm-thumb.inc | 12 +++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/meta/conf/machine/include/arm/arch-armv4.inc b/meta/conf/machine/include/arm/arch-armv4.inc
index c33c816..4b43e9f 100644
--- a/meta/conf/machine/include/arm/arch-armv4.inc
+++ b/meta/conf/machine/include/arm/arch-armv4.inc
@@ -18,7 +18,7 @@ require conf/machine/include/arm/feature-arm-thumb.inc
AVAILTUNES += "armv4 armv4t"
ARMPKGARCH_tune-armv4 ?= "armv4"
ARMPKGARCH_tune-armv4t ?= "armv4"
-TUNE_FEATURES_tune-armv4 ?= "armv4"
+TUNE_FEATURES_tune-armv4 ?= "arm armv4"
TUNE_FEATURES_tune-armv4t ?= "${TUNE_FEATURES_tune-armv4} thumb"
PACKAGE_EXTRA_ARCHS_tune-armv4 = "arm armv4"
PACKAGE_EXTRA_ARCHS_tune-armv4t = "${PACKAGE_EXTRA_ARCHS_tune-armv4} armv4t"
diff --git a/meta/conf/machine/include/arm/feature-arm-thumb.inc b/meta/conf/machine/include/arm/feature-arm-thumb.inc
index 09a127a..aaa39dc 100644
--- a/meta/conf/machine/include/arm/feature-arm-thumb.inc
+++ b/meta/conf/machine/include/arm/feature-arm-thumb.inc
@@ -13,11 +13,17 @@ ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7a', 't2', '', d
ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7r', 't2', '', d)}"
ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 't2', '', d)}"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_THUMB_OPT}', '', d)}"
+# If the device supports ARM, then respect ARM_THUMB_OPT
+# If the defice doesn't support ARM, then always set "thumb" even when
+# some recipe explicitly sets ARM_INSTRUCTION_SET to "arm"
+# (maybe we should show warning in this case)
+ARM_M_OPT = "${@bb.utils.contains('TUNE_FEATURES', 'arm', '${ARM_THUMB_OPT}', 'thumb', d)}"
+
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}', '', d)}"
OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ':thumb', '', d)}"
-# Add suffix from ARM_THUMB_SUFFIX only if after all this we still set ARM_THUMB_OPT to thumb
-ARMPKGSFX_THUMB .= "${@ d.getVar('ARM_THUMB_SUFFIX', True) if d.getVar('ARM_THUMB_OPT', True) == 'thumb'] else ''}"
+# Add suffix from ARM_THUMB_SUFFIX only if after all this we still set ARM_M_OPT to thumb
+ARMPKGSFX_THUMB .= "${@ d.getVar('ARM_THUMB_SUFFIX', True) if d.getVar('ARM_M_OPT', True) == 'thumb'] else ''}"
# Whether to compile with code to allow interworking between the two
# instruction sets. This allows thumb code to be executed on a primarily
--
1.8.5.3
More information about the Openembedded-core
mailing list