diff options
author | Changqing Li <changqing.li@windriver.com> | 2022-12-23 11:38:40 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-13 18:11:19 +0000 |
commit | dbe88ee83ef349bfff053bf9b824b86f7a373776 (patch) | |
tree | 60b92b0a90f39358211bde8923f8f1d62dc9a681 | |
parent | 286af7e04401979285790b7d1dfd9951b5439ddf (diff) | |
download | poky-dbe88ee83ef349bfff053bf9b824b86f7a373776.tar.gz |
base.bbclass: Fix way to check ccache path
The previous code had 2 issues:
1. make hosttools/ccache always link to host's ccache (/usr/bin/ccache)
even we have one buildtools
2. make hosttools/gcc etc, link to host's gcc event we have one
buildtools when keyword ccache in buildtools's path, eg:
/mnt/ccache/bin/buildtools
This patch is for fix above issues.
(From OE-Core rev: f2f70bf8d93b33b65875828c0402a98e943f660a)
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 1b7c81414cf252a7203d95703810a770184d7e4d)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/base.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 19604a4646..3cae577a0e 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -139,7 +139,7 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True): | |||
139 | # /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then which(gcc) | 139 | # /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then which(gcc) |
140 | # would return /usr/local/bin/ccache/gcc, but what we need is | 140 | # would return /usr/local/bin/ccache/gcc, but what we need is |
141 | # /usr/bin/gcc, this code can check and fix that. | 141 | # /usr/bin/gcc, this code can check and fix that. |
142 | if "ccache" in srctool: | 142 | if os.path.islink(srctool) and os.path.basename(os.readlink(srctool)) == 'ccache': |
143 | srctool = bb.utils.which(path, tool, executable=True, direction=1) | 143 | srctool = bb.utils.which(path, tool, executable=True, direction=1) |
144 | if srctool: | 144 | if srctool: |
145 | os.symlink(srctool, desttool) | 145 | os.symlink(srctool, desttool) |