summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2018-12-13 11:19:28 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-14 17:10:59 +0000
commit66c263884444cf5c68447612562f6b6eb93a9711 (patch)
treedb48e0d44648a0be1dac0400d24012600e65ca8c /meta/lib
parentbc25bb645ee20ab3d2227e3ed58b23dd25201c97 (diff)
downloadpoky-66c263884444cf5c68447612562f6b6eb93a9711.tar.gz
lib/oe/utils: Set stderr for host_gcc_version()
Fixed: $ ln -s /usr/bin/ccache /folk/lyang1/bin/gcc $ rm -fr tmp/hosttools/ && bitbake -p [snip] ERROR: Error running gcc --version: It didn't print the error message, now it is: ERROR: Error running gcc --version: ccache: error: Could not find compiler "gcc" in PATH For the error itself, it is because ccache is not in my HOSTTOOLS, so this is an expected error. (From OE-Core rev: 91955caae584b4f75118e04411851b1a3d783fec) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 8a584d6ddd..29b41151d4 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -366,7 +366,8 @@ def host_gcc_version(d, taskcontextonly=False):
366 try: 366 try:
367 env = os.environ.copy() 367 env = os.environ.copy()
368 env["PATH"] = d.getVar("PATH") 368 env["PATH"] = d.getVar("PATH")
369 output = subprocess.check_output("%s --version" % compiler, shell=True, env=env).decode("utf-8") 369 output = subprocess.check_output("%s --version" % compiler, \
370 shell=True, env=env, stderr=subprocess.STDOUT).decode("utf-8")
370 except subprocess.CalledProcessError as e: 371 except subprocess.CalledProcessError as e:
371 bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8"))) 372 bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8")))
372 373