<div dir="ltr">This should probably remove the dirname srctool from path and check again with the same direction, rather than reversing it, in case the toolchain is in multiple locations in PATH, as you’re flipping the PATH priority order doing it this way. I realize you’re just updating the description, not the code, so just a random th ought for the future here..</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 11, 2018 at 11:44 PM Robert Yang <<a href="mailto:liezhi.yang@windriver.com">liezhi.yang@windriver.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Signed-off-by: Robert Yang <<a href="mailto:liezhi.yang@windriver.com" target="_blank">liezhi.yang@windriver.com</a>><br>
---<br>
meta/classes/base.bbclass | 4 ++++<br>
1 file changed, 4 insertions(+)<br>
<br>
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass<br>
index e715ffa..e6af673 100644<br>
--- a/meta/classes/base.bbclass<br>
+++ b/meta/classes/base.bbclass<br>
@@ -122,6 +122,10 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True):<br>
desttool = os.path.join(dest, tool)<br>
if not os.path.exists(desttool):<br>
srctool = bb.utils.which(path, tool, executable=True)<br>
+ # gcc/g++ may link to ccache on some hosts, e.g.,<br>
+ # /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then which(gcc)<br>
+ # would return /usr/local/bin/ccache/gcc, but what we need is<br>
+ # /usr/bin/gcc, this code can check and fix that.<br>
if "ccache" in srctool:<br>
srctool = bb.utils.which(path, tool, executable=True, direction=1)<br>
if srctool:<br>
-- <br>
2.7.4<br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Senior Software Engineer, Mentor Graphics</div></div></div></div>