On Tue, Apr 4, 2023 at 4:13 AM Enrico Jörns <[email protected]> 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    |
> > >
> > >
> > > 
> > >
> >
>
> --
> 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 (#179702): 
https://lists.openembedded.org/g/openembedded-core/message/179702
Mute This Topic: https://lists.openembedded.org/mt/97970644/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to