From ce6bf125aba7344d56368885605949e373b06393 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Wed, 12 Dec 2018 14:59:59 +0800 Subject: base.bbclass: Add comments for gcc links to ccache Signed-off-by: Robert Yang Signed-off-by: Richard Purdie --- meta/classes/base.bbclass | 4 ++++ 1 file changed, 4 insertions(+) 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: -- cgit 1.2.3-korg