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-15 11:05:19 +0000 |
| commit | af8a7f0eb760d3a49db5c22b7d6fbed42d1931a0 (patch) | |
| tree | dd3875d0d966ef31800bceca66b675253a50b4f1 /meta/classes-global/base.bbclass | |
| parent | d67c0e657c9b042f482a060e20b92e581b333b63 (diff) | |
| download | poky-af8a7f0eb760d3a49db5c22b7d6fbed42d1931a0.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: 539bc9d15e32c9574a0c038a6d1d666b5fb40d90)
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>
Diffstat (limited to 'meta/classes-global/base.bbclass')
| -rw-r--r-- | meta/classes-global/base.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index 8203f54519..2d0e35517e 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/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) |
