[OE-core] [oe-core][patch v2] sanity.bbclass: correct the gcc_arch check logic

Richard Purdie richard.purdie at linuxfoundation.org
Tue Jun 18 13:04:13 UTC 2013


On Tue, 2013-06-18 at 21:08 +0800, Zhenhua Luo wrote:
> The gcc arch check result is incorrect when gcc version is older than 4.5.
> Sanity checker requests user to add "-march=native" into BUILD_CFLAGS even if
> the flag is not supported by host gcc.
> 
> The status is 0 when -march=native is supported by host gcc, so set result to
> True, otherwise set result to False.
> 
> Signed-off-by: Zhenhua Luo <zhenhua.luo at freescale.com>
> ---
>  meta/classes/sanity.bbclass |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 3b9934b..ee09679 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -325,7 +325,7 @@ def check_gcc_march(sanity_data):
>          if status != 0:
>              # Check if GCC could work with march
>              status,result = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test")
> -            if status != 0: 
> +            if status == 0: 
>                  result = True
>              else:
>                  result = False

Can you and Randy please sort out what the correct value is here please.
This appears to directly revert
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=ad276d7d89190c57a152867d7278ee18f784ff2c

Cheers,

Richard





More information about the Openembedded-core mailing list