Openembedded Core Discussions
 help / color / mirror / Atom feed
* [patch v2] sanity.bbclass: correct the gcc_arch check logic
@ 2013-06-18 13:08 Zhenhua Luo
  2013-06-18 13:04 ` Richard Purdie
  0 siblings, 1 reply; 11+ messages in thread
From: Zhenhua Luo @ 2013-06-18 13:08 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenhua Luo, b40527

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@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
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-07-24  2:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 13:08 [patch v2] sanity.bbclass: correct the gcc_arch check logic Zhenhua Luo
2013-06-18 13:04 ` Richard Purdie
2013-06-18 13:26   ` Luo Zhenhua-B19537
2013-06-20  3:28   ` Luo Zhenhua-B19537
2013-06-21 17:37     ` Randy MacLeod
2013-06-25 21:56     ` Randy MacLeod
2013-06-26 22:16     ` Randy MacLeod
2013-06-27  4:03       ` Luo Zhenhua-B19537
2013-07-05  8:23       ` Luo Zhenhua-B19537
2013-07-23 17:24         ` Randy MacLeod
2013-07-24  2:15           ` Luo Zhenhua-B19537

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox