[OE-core] [PATCH 5/6] base.bbclass: Add comments for gcc links to ccache
Robert Yang
liezhi.yang at windriver.com
Wed Dec 12 06:59:59 UTC 2018
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
meta/classes/base.bbclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e715ffa..e6af673 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:
--
2.7.4
More information about the Openembedded-core
mailing list