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:15 +0000 |
| commit | d369e47a825d7cbfb5f46a6bc137fc20231dcbf2 (patch) | |
| tree | 5484e233d31cdeae4293ca9f5687e9984f323dba /meta/classes/base.bbclass | |
| parent | 7750385191acef1b0b511cc1f837f5c40636cea4 (diff) | |
| download | poky-d369e47a825d7cbfb5f46a6bc137fc20231dcbf2.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: 19f6849b161115161c025a0b435229d5097abb9e)
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/base.bbclass')
| -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 cb9da78ab6..b15c5839b6 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
| @@ -132,7 +132,7 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True): | |||
| 132 | # /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then which(gcc) | 132 | # /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then which(gcc) |
| 133 | # would return /usr/local/bin/ccache/gcc, but what we need is | 133 | # would return /usr/local/bin/ccache/gcc, but what we need is |
| 134 | # /usr/bin/gcc, this code can check and fix that. | 134 | # /usr/bin/gcc, this code can check and fix that. |
| 135 | if "ccache" in srctool: | 135 | if os.path.islink(srctool) and os.path.basename(os.readlink(srctool)) == 'ccache': |
| 136 | srctool = bb.utils.which(path, tool, executable=True, direction=1) | 136 | srctool = bb.utils.which(path, tool, executable=True, direction=1) |
| 137 | if srctool: | 137 | if srctool: |
| 138 | os.symlink(srctool, desttool) | 138 | os.symlink(srctool, desttool) |
