Re: [OE-core] [PATCH v2 0/9] Add barebox bootloader support (and testing)

Khem Raj
2023-04-04T16:11:42Z

On Tue, Apr 4, 2023 at 4:13 AM Enrico Jörns <ejo@pengutronix.de> wrote:
>
> Hi Khem,
>
> > Am Montag, dem 03.04.2023 um 19:33 -0700 schrieb Khem Raj:
>
>
> > [...]
>
> > I see that it fails to build with clang
> > https://errors.yoctoproject.org/Errors/Details/699467/
>
> thanks for testing this!
>
> > is it buildable with clang ? if not we can pin it to use gcc always in
> > meta-clang but I want to make sure first.
>
> barebox itself is unfortunately not buildable with clang since on some architectures like ARM32 it
> uses GCC extensions that are not implemented by clang.
>
> The barebox-tools however that are built for 'sandbox' should be buildable with clang.
> It's just that when passing CROSS_COMPILE, barebox cannot guess if it has to append 'clang' or 'gcc'
> suffix. The kernel seems to have an explicit handling for this by checking for "ifneq ($(LLVM),)"
> and plugging together CC differently.
>
> With barebox we could however still override the Makefile's default "CC = $(CROSS_COMPILE)gcc" when
> passing CC explicitly to EXTRA_OEMAKE. We have just successfully tested this patch:
>
> --- a/meta/recipes-bsp/barebox/barebox-tools_2023.03.0.bb
> +++ b/meta/recipes-bsp/barebox/barebox-tools_2023.03.0.bb
> @@ -18,6 +18,8 @@ EXTRA_OEMAKE = " \
> ARCH=sandbox \
> CROSS_COMPILE=${TARGET_PREFIX} -C ${S} O=${B} \
> CROSS_PKG_CONFIG=pkg-config \
> + CC='${CC}' \
> + LD='${LD}' \
> "
>
>
> If that looks fine for you, I could add it to the recipe.
>

yeah I was testing one with CC alone and that worked too but also
containing LD is good, so please include above
changes in next patchset

>
> Best regards, Enrico
>
> >
> > >
> > > Thanks in advance and best regards
> > >
> > > Enrico
> > >
> > >
> > > > Cheers,
> > > >
> > > > Richard
> > > >
> > > >
> > >
> > > --
> > > Pengutronix e.K. | Enrico Jörns |
> > > Embedded Linux Consulting & Support | https://www.pengutronix.de/ |
> > > Steuerwalder Str. 21 | Phone: +49-5121-206917-180 |
> > > 31137 Hildesheim, Germany | Fax: +49-5121-206917-9 |
> > >
> > >
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > > View/Reply Online (#179655): https://lists.openembedded.org/g/openembedded-core/message/179655
> > > Mute This Topic: https://lists.openembedded.org/mt/97970644/1997914
> > > Group Owner: openembedded-core+owner@lists.openembedded.org
> > > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > >
> >
>
> --
> Pengutronix e.K. | Enrico Jörns |
> Embedded Linux Consulting & Support | https://www.pengutronix.de/ |
> Steuerwalder Str. 21 | Phone: +49-5121-206917-180 |
> 31137 Hildesheim, Germany | Fax: +49-5121-206917-9 |
>