Re: [yocto] Building u-boot with clang

Khem Raj <[email protected]>
Newsgroups org.yoctoproject.lists.yocto
Message-ID <CAMKF1spph3_i8074mkFHz7GGn9gR7qprxexRCCxvzigvBz9Ncw@mail.gmail.com>
On Thu, Oct 16, 2025 at 5:51 PM Anirudh Mathukumilli via
Lists.Yoctoproject.Org <[email protected]>
wrote:
>
> Thanks for the quick response!
>
> My issue actually is that the GCC compiler removed support for the chipset I'm targeting in GCC 9. So, I either have to somehow pin yocto to using GCC 8, or use clang to build everything. Utilizing clang seemed like the more resilient option moving forward, especially if we want to use newer C++ versions, but if we need gcc-cross-powerpc to compile glibc and compiler-rt then that's not a viable option. Are there any plans to support for these components moving forward?
>

There are no plans if the support is gone in gcc 9 that's a red flag
for OE to support, these days minimum version is gcc 10 for OE/Yocto
if you are using master branch.

> If not, then I think I'll just have to try and use an older GCC version - is there a way to tell yocto to use GCC version 8.5.2 (or just any version before GCC 9) when compiling the u-boot recipe?

you can do some hacks, if its just needed for u-boot -
https://github.com/YoeDistro/meta-odroid/blob/master/recipes-bsp/u-boot/u-boot-hardkernel_2015.01.bb#L26-L31

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