* this means that recipes with ARM_INSTRUCTION_SET explicitly changed to arm will be built in feed without thumb suffix * I'm not sure if the rest of system correctly supports different TUNE_PKGARCHs for different recipes, this is one of the reasons why this is WIP/RFC
Signed-off-by: Martin Jansa <martin.ja...@gmail.com> --- meta/conf/machine/include/arm/feature-arm-thumb.inc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/meta/conf/machine/include/arm/feature-arm-thumb.inc b/meta/conf/machine/include/arm/feature-arm-thumb.inc index d58c4b4..09a127a 100644 --- a/meta/conf/machine/include/arm/feature-arm-thumb.inc +++ b/meta/conf/machine/include/arm/feature-arm-thumb.inc @@ -5,14 +5,19 @@ # 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']}" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' ${ARM_THUMB_M_OPT}', '', d)}" +ARM_THUMB_OPT = "${@['arm', 'thumb'][d.getVar('ARM_INSTRUCTION_SET', True) == 'thumb']}" +ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', 't', '', d)}" +ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv5', 't', '', d)}" +ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv6', 't', '', d)}" +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)}" OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ':thumb', '', d)}" -ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', [ 'armv4', 'thumb' ], 't', '', d)}" -ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', [ 'armv5', 'thumb' ], 't', '', d)}" -ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', [ 'armv6', 'thumb' ], 't', '', d)}" -ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', [ 'armv7a', 'thumb' ], 't2', '', 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 ''}" # 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 _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core