[OE-core] [PATCH 5/6] base.bbclass: Add comments for gcc links to ccache

Robert Yang liezhi.yang at windriver.com
Thu Dec 13 01:49:53 UTC 2018


Hi Christopher,

On 12/12/18 11:50 PM, Christopher Larson wrote:
> This should probably remove the dirname srctool from path and check again with 
> the same direction, rather than reversing it, in case the toolchain is in 
> multiple locations in PATH, as  you’re flipping the PATH priority order doing it 
> this way. I realize you’re just updating the description, not the code, so just 
> a random th ought for the future here..

The problem is I don't know whether the code is also used for fixing other
cases. So I'm leaning to keep it as the current status since it works.

// Robert

> 
> On Tue, Dec 11, 2018 at 11:44 PM Robert Yang <liezhi.yang at windriver.com 
> <mailto:liezhi.yang at windriver.com>> wrote:
> 
>     Signed-off-by: Robert Yang <liezhi.yang at windriver.com
>     <mailto:liezhi.yang at windriver.com>>
>     ---
>       meta/classes/base.bbclass | 4 ++++
>       1 file changed, 4 insertions(+)
> 
>     diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
>     index e715ffa..e6af673 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:
>     -- 
>     2.7.4
> 
>     -- 
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core at lists.openembedded.org
>     <mailto:Openembedded-core at lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 
> 
> 
> -- 
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Senior Software Engineer, Mentor Graphics


More information about the Openembedded-core mailing list