diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-09 14:55:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-09 16:05:08 +0100 |
commit | b54339d63339c99f24845f69f49cd1fe996e6e7c (patch) | |
tree | 73b3da57a66ab4a0f6fa06a479efc5449126342f /meta/classes/sanity.bbclass | |
parent | d529c11fa512e7f06044378a7ec7137765ea8eb4 (diff) | |
download | poky-b54339d63339c99f24845f69f49cd1fe996e6e7c.tar.gz |
classes/lib: Fix getcmdstatus breakage
I mistakenly thought subprocess had getcmdstatus in python 2. It doesn't so lets
add a wrapper and have this work in both worlds.
(From OE-Core rev: 2253e9f12734c6e6aa489942b5e4628eca1fa29d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r-- | meta/classes/sanity.bbclass | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 3836c0404d..1fb4a6c629 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -342,13 +342,12 @@ def check_gcc_march(sanity_data): | |||
342 | f = open("gcc_test.c", "w") | 342 | f = open("gcc_test.c", "w") |
343 | f.write("int main (){ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4; return 0;}\n") | 343 | f.write("int main (){ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4; return 0;}\n") |
344 | f.close() | 344 | f.close() |
345 | import subprocess | ||
346 | 345 | ||
347 | # Check if GCC could work without march | 346 | # Check if GCC could work without march |
348 | status,result = subprocess.getstatusoutput("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test") | 347 | status,result = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test") |
349 | if status != 0: | 348 | if status != 0: |
350 | # Check if GCC could work with march | 349 | # Check if GCC could work with march |
351 | status,result = subprocess.getstatusoutput("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test") | 350 | status,result = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test") |
352 | if status == 0: | 351 | if status == 0: |
353 | result = True | 352 | result = True |
354 | else: | 353 | else: |