diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/conf/machine/include/arm/feature-arm-thumb.inc | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/conf/machine/include/arm/feature-arm-thumb.inc')
-rw-r--r-- | poky/meta/conf/machine/include/arm/feature-arm-thumb.inc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/poky/meta/conf/machine/include/arm/feature-arm-thumb.inc b/poky/meta/conf/machine/include/arm/feature-arm-thumb.inc new file mode 100644 index 000000000..0b47ccad0 --- /dev/null +++ b/poky/meta/conf/machine/include/arm/feature-arm-thumb.inc @@ -0,0 +1,30 @@ + +TUNEVALID[thumb] = "Support Thumb instructions" + +ARM_THUMB_SUFFIX = "${@bb.utils.contains_any('TUNE_FEATURES', 'armv4 armv5 armv6', 't', 't2', d)}" + +# If the device supports ARM, then respect ARM_THUMB_OPT (which can be "arm" or "thumb") +# If the device doesn't support ARM, then always set "thumb" even when +# some recipe explicitly sets ARM_INSTRUCTION_SET to "arm" +ARM_THUMB_OPT = "${@['arm', 'thumb'][d.getVar('ARM_INSTRUCTION_SET') == 'thumb']}" +ARM_M_OPT = "${@bb.utils.contains('TUNE_FEATURES', 'arm', '${ARM_THUMB_OPT}', 'thumb', d)}" + +python () { + if bb.utils.contains('TUNE_FEATURES', 'thumb', False, True, d): + return + selected = d.getVar('ARM_INSTRUCTION_SET') + if selected == None: + return + used = d.getVar('ARM_M_OPT') + if selected != used: + pn = d.getVar('PN') + bb.warn("Recipe '%s' selects ARM_INSTRUCTION_SET to be '%s', but tune configuration overrides it to '%s'" % (pn, selected, used)) +} + +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}', '', d)}" + +# Add suffix from ARM_THUMB_SUFFIX only if after all this we still set ARM_M_OPT to thumb +ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', d) if d.getVar('ARM_M_OPT') == 'thumb' else ''}" + +# what about armv7m devices which don't support -marm (e.g. Cortex-M3)? +TARGET_CC_KERNEL_ARCH += "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork -marm', '', d)}" |