summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2018-12-12 14:59:59 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-15 17:10:44 +0000
commitce6bf125aba7344d56368885605949e373b06393 (patch)
treeef00b5da11ea63053d0763f96b4bd094a16b7cbf /meta/classes/base.bbclass
parentd4063951acabae0b69fc195ec1e0f2dcd02a5d01 (diff)
downloadopenembedded-core-ce6bf125aba7344d56368885605949e373b06393.tar.gz
openembedded-core-ce6bf125aba7344d56368885605949e373b06393.tar.bz2
openembedded-core-ce6bf125aba7344d56368885605949e373b06393.zip
base.bbclass: Add comments for gcc links to ccache
Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e715ffa1b2..e6af673847 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -122,6 +122,10 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True):
desttool = os.path.join(dest, tool)
if not os.path.exists(desttool):
srctool = bb.utils.which(path, tool, executable=True)
+ # gcc/g++ may link to ccache on some hosts, e.g.,
+ # /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then which(gcc)
+ # would return /usr/local/bin/ccache/gcc, but what we need is
+ # /usr/bin/gcc, this code can check and fix that.
if "ccache" in srctool:
srctool = bb.utils.which(path, tool, executable=True, direction=1)
if srctool: