summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorTobias Henkel <tobias.henkel@bmw-carit.de>2013-11-15 08:36:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-20 14:03:27 +0000
commit17c155b9c34f4bcdaa3528cc3b2bbefeaef45859 (patch)
treeebe75c3e14d4546f42d5c9e7dece536f7c363e38 /meta
parentf2ed8fa276df54a935037633e5ed5874dd52e2ca (diff)
downloadpoky-17c155b9c34f4bcdaa3528cc3b2bbefeaef45859.tar.gz
icecc: Use bb.utils.which instead of calling which
The icecc class often calls 'which' for determining paths. This leads to many messages on stderr in case 'which' doesn't find the executable. Using bb.utils.which is more appropriate here and doesn't pollute stderr. (From OE-Core rev: 7ed7aa38182ce8c7300a08e3aefcc65da2b524a8) Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/icecc.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 1f53f855fe..49dbd77019 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -55,7 +55,7 @@ def get_cross_kernel_cc(bb,d):
55 return kernel_cc 55 return kernel_cc
56 56
57def get_icecc(d): 57def get_icecc(d):
58 return d.getVar('ICECC_PATH') or os.popen("which icecc").read()[:-1] 58 return d.getVar('ICECC_PATH') or bb.utils.which(os.getenv("PATH"), "icecc")
59 59
60def create_path(compilers, bb, d): 60def create_path(compilers, bb, d):
61 """ 61 """
@@ -175,9 +175,9 @@ def icc_get_external_tool(bb, d, tool):
175 175
176def icc_get_tool(bb, d, tool): 176def icc_get_tool(bb, d, tool):
177 if icc_is_native(bb, d): 177 if icc_is_native(bb, d):
178 return os.popen("which %s" % tool).read()[:-1] 178 return bb.utils.which(os.getenv("PATH"), tool)
179 elif icc_is_kernel(bb, d): 179 elif icc_is_kernel(bb, d):
180 return os.popen("which %s" % get_cross_kernel_cc(bb, d)).read()[:-1] 180 return bb.utils.which(os.getenv("PATH"), get_cross_kernel_cc(bb, d))
181 else: 181 else:
182 ice_dir = d.expand('${STAGING_BINDIR_TOOLCHAIN}') 182 ice_dir = d.expand('${STAGING_BINDIR_TOOLCHAIN}')
183 target_sys = d.expand('${TARGET_SYS}') 183 target_sys = d.expand('${TARGET_SYS}')