Re: [yocto] Building u-boot with clang

Khem Raj <[email protected]>
Newsgroups org.yoctoproject.lists.yocto
Message-ID <CAMKF1srraguxbAXrVbfJDfv69=TShjSgjKmzpvDw7-3zi0wQpg@mail.gmail.com>
On Thu, Oct 16, 2025 at 5:08 PM Anirudh Mathukumilli via
lists.yoctoproject.org <[email protected]>
wrote:
>
> Hey folks,
>
> I'm trying to use Yocto to build a u-boot image using clang. I need to use clang because the system I'm targeting is not supported by GCC. So, I've integrated the meta-clang layer and have assigned `TOOLCHAIN = "clang"` in my local.conf. This seems to correctly select clang as the correct compiler to use when building u-boot; I've verified this by trying to build with an arm64 machine and seeing clang work.
>

good.

> However, when I switch my machine to the custom machine I'm targeting (a powerpc variant), my yocto build fails trying to build the GCC cross compiler for that architecture. Why is Yocto attempting to even build this cross compiler? Is there a way for me to tell yocto to not use GCC at all?

we have not yet bootstrapped full system with clang yet. Even though
it can be used to build most of system some components e.g.,  glibc
still need gcc to build, compiler-rt has dependency on gcc-runtime
which
also comes from gcc, so compiling gcc-cross will happen. as far as ppc
is concerned, we do have it nominally supported but its not regularly
tested on master so I wont be. surprised if it does not build. however
if you share more information we might be able to help.

>
> -Anirudh
>
>
>
> ________
> This email and any attachments may contain Astranis confidential and/or proprietary information governed by a non-disclosure agreement, and are intended solely for the individual or entity specified by the message.
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> You automatically follow any topics you start or reply to.
> View/Reply Online (#65939): https://lists.yoctoproject.org/g/yocto/message/65939
> Mute This Topic: https://lists.yoctoproject.org/mt/115800062/1997914
> Group Owner: [email protected]
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
> -=-=-=-=-=-=-=-=-=-=-=-
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.