Message ID | 20221223033840.2574054-1-changqing.li@windriver.com |
---|---|
State | Accepted, archived |
Commit | 1b7c81414cf252a7203d95703810a770184d7e4d |
Headers | show |
Series | base.bbclass: Fix way to check ccache path | expand |
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index c4ac43c569..64e805c947 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass @@ -116,7 +116,7 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True): # /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: + if os.path.islink(srctool) and os.path.basename(os.readlink(srctool)) == 'ccache': srctool = bb.utils.which(path, tool, executable=True, direction=1) if srctool: os.symlink(srctool, desttool)