From: Robert Yang Date: Wed, 12 Dec 2018 06:59:59 +0000 (+0800) Subject: base.bbclass: Add comments for gcc links to ccache X-Git-Tag: uninative-2.4~832 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=ce6bf125aba7344d56368885605949e373b06393;p=openembedded-core.git base.bbclass: Add comments for gcc links to ccache Signed-off-by: Robert Yang Signed-off-by: Richard Purdie --- 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: