aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2018-12-13 11:14:17 +0800
committerRobert Yang <liezhi.yang@windriver.com>2018-12-13 11:17:05 +0800
commit337e1401f58bfb235b34e6113834a51048853090 (patch)
treec6b0192ec2c09b188bf8a461340584d4eba8edcd
parent8bc0d2f2197430723f8b2d0785169e48c883eedb (diff)
downloadopenembedded-core-contrib-rbt/stderr.tar.gz
lib/oe/utils: Set stderr for host_gcc_version()rbt/stderr
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. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-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):
try:
env = os.environ.copy()
env["PATH"] = d.getVar("PATH")
- output = subprocess.check_output("%s --version" % compiler, shell=True, env=env).decode("utf-8")
+ output = subprocess.check_output("%s --version" % compiler, \
+ shell=True, env=env, stderr=subprocess.STDOUT).decode("utf-8")
except subprocess.CalledProcessError as e:
bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8")))