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

Khem Raj raj.khem at gmail.com
Fri Aug 5 15:23:45 UTC 2011


On Friday, August 05, 2011 03:34:43 PM Phil Blundell wrote:
> 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.
> 

I prefer the latter since it will have one option less in gcc commandline
saving a minute bit of time spent in parsing cmdline.
> p.
> 
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




More information about the Openembedded-core mailing list