[OE-core] [PATCH] tune/armv7: Add -mthumb to TUNE_CCARGS

Richard Purdie richard.purdie at linuxfoundation.org
Mon Mar 26 11:01:29 UTC 2012


On Sun, 2012-03-25 at 09:48 -0700, Khem Raj wrote:
> armv7 is least common denominator of armv7-a
> armv7-m and armv7-r and armv7-m does not support
> ARM instructions but only thumb2 instruction set
> which means armv7 when chosen will complain if
> code is compiled in arm mode which is default
> in OE if not specified other wise
> 
> Fixes errors like below
> 
> error: target CPU does not support ARM mode
> 
> Signed-off-by: Khem Raj <raj.khem at gmail.com>
> ---
>  meta/conf/machine/include/arm/arch-armv7.inc |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/conf/machine/include/arm/arch-armv7.inc b/meta/conf/machine/include/arm/arch-armv7.inc
> index 33d9f0d..563a6b4 100644
> --- a/meta/conf/machine/include/arm/arch-armv7.inc
> +++ b/meta/conf/machine/include/arm/arch-armv7.inc
> @@ -4,7 +4,7 @@ ARMPKGARCH ?= "armv7"
>  
>  TUNEVALID[armv7] = "Enable instructions for ARMv7"
>  TUNE_CONFLICTS[armv7] = "armv4 armv5 armv6"
> -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "armv7", "-march=armv7", "", d)}"
> +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "armv7", "-march=armv7 -mthumb", "", d)}"
>  MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "armv7", ":armv7", "" ,d)}"
>  
>  require conf/machine/include/arm/arch-armv6.inc

Looking at this file, if the above is true and armv7 can't do anything
other than thumb, shouldn't we just delete the non-thumb configurations
for "armv7"?

Adding in "thumb" to the TUNE_FEATURES should add the -mthumb it needs
to work.

Cheers,

Richard






More information about the Openembedded-core mailing list