[OE-core] [PATCH 22/22] feature-arm-thumb: Take ARM_INSTRUCTION_SET into account to decide thumb mode

Phil Blundell philb at gnu.org
Fri Aug 5 14:34:43 UTC 2011


On Fri, 2011-08-05 at 12:39 +0100, Richard Purdie wrote:
> 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)}"
> 
> Master has the above. This means it can set -mthumb for machines that don't have the thumb feature which seems wrong to me. I suspect it should be:

Agreed, it does seem as though any bb.utils.contains() where the "true"
and "false" arms are identical must be wrong.

> TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "thumb", "${ARM_THUMB_M_OPT}", "-mno-thumb", d)}"
> 
> or if gcc can't cope with that,
> 
> TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "thumb", "${ARM_THUMB_M_OPT}", "", d)}"

I think either of those should be fine.

p.






More information about the Openembedded-core mailing list