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

Christopher Larson kergoth at gmail.com
Wed Dec 12 15:50:56 UTC 2018


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..

On Tue, Dec 11, 2018 at 11:44 PM Robert Yang <liezhi.yang at windriver.com>
wrote:

> Signed-off-by: Robert Yang <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
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20181212/6dc694ce/attachment.html>


More information about the Openembedded-core mailing list