mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
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>
This commit is contained in:
@@ -342,13 +342,12 @@ def check_gcc_march(sanity_data):
|
||||
f = open("gcc_test.c", "w")
|
||||
f.write("int main (){ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4; return 0;}\n")
|
||||
f.close()
|
||||
import subprocess
|
||||
|
||||
# Check if GCC could work without march
|
||||
status,result = subprocess.getstatusoutput("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test")
|
||||
status,result = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test")
|
||||
if status != 0:
|
||||
# Check if GCC could work with march
|
||||
status,result = subprocess.getstatusoutput("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test")
|
||||
status,result = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test")
|
||||
if status == 0:
|
||||
result = True
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user