]> code.ossystems Code Review - openembedded-core.git/commitdiff
base.bbclass: Add comments for gcc links to ccache
authorRobert Yang <liezhi.yang@windriver.com>
Wed, 12 Dec 2018 06:59:59 +0000 (14:59 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 15 Dec 2018 17:10:44 +0000 (17:10 +0000)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass

index e715ffa1b2a9dc373febb6a19d25adc99db67f63..e6af6738479103e3e17129694c9c16dd50a611f0 100644 (file)
@@ -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: