public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [OE-core][PATCH] opensbi: force gcc toolchain
@ 2026-01-22 15:30 thomas.perrot
  2026-01-22 17:19 ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: thomas.perrot @ 2026-01-22 15:30 UTC (permalink / raw)
  To: openembedded-core; +Cc: thomas.petazzoni, Thomas Perrot

From: Thomas Perrot <thomas.perrot@bootlin.com>

OpenSBI requires the gcc toolchain to build correctly. Set TOOLCHAIN
explicitly to prevent build failures when using alternative
toolchains.

Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
---
 meta/recipes-bsp/opensbi/opensbi_1.8.1.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-bsp/opensbi/opensbi_1.8.1.bb b/meta/recipes-bsp/opensbi/opensbi_1.8.1.bb
index 0a9652c2831e..52d7b38ff2ba 100644
--- a/meta/recipes-bsp/opensbi/opensbi_1.8.1.bb
+++ b/meta/recipes-bsp/opensbi/opensbi_1.8.1.bb
@@ -15,6 +15,8 @@ TARGET_DBGSRC_DIR = "/share/opensbi/*/generic/firmware/"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
+TOOLCHAIN = "gcc"
+
 RISCV_SBI_FW_TEXT_START ??= "0x80000000"
 EXTRA_OEMAKE += "REPRODUCIBLE=y CROSS_COMPILE=${HOST_PREFIX} ELFFLAGS="${LDFLAGS}" PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_TEXT_START=${RISCV_SBI_FW_TEXT_START}"
 EXTRA_OEMAKE:append:toolchain-clang = " LLVM=y"
-- 
2.52.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [OE-core][PATCH] opensbi: force gcc toolchain
  2026-01-22 15:30 [OE-core][PATCH] opensbi: force gcc toolchain thomas.perrot
@ 2026-01-22 17:19 ` Khem Raj
  2026-02-03 17:02   ` Thomas Perrot
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2026-01-22 17:19 UTC (permalink / raw)
  To: thomas.perrot; +Cc: openembedded-core, thomas.petazzoni

[-- Attachment #1: Type: text/plain, Size: 1841 bytes --]

On Thu, Jan 22, 2026 at 7:31 AM Thomas Perrot via lists.openembedded.org
<thomas.perrot=bootlin.com@lists.openembedded.org> wrote:

> From: Thomas Perrot <thomas.perrot@bootlin.com>
>
> OpenSBI requires the gcc toolchain to build correctly. Set TOOLCHAIN
> explicitly to prevent build failures when using alternative
> toolchains.
>

I am assuming you are having issues compiling it with clang, it would be
good to document whats going wrong.
Since it's a bug to address, openSBI does not intend to use a particular
compiler.


>
> Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
> ---
>  meta/recipes-bsp/opensbi/opensbi_1.8.1.bb | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-bsp/opensbi/opensbi_1.8.1.bb
> b/meta/recipes-bsp/opensbi/opensbi_1.8.1.bb
> index 0a9652c2831e..52d7b38ff2ba 100644
> --- a/meta/recipes-bsp/opensbi/opensbi_1.8.1.bb
> +++ b/meta/recipes-bsp/opensbi/opensbi_1.8.1.bb
> @@ -15,6 +15,8 @@ TARGET_DBGSRC_DIR = "/share/opensbi/*/generic/firmware/"
>
>  TARGET_CC_ARCH += "${LDFLAGS}"
>
> +TOOLCHAIN = "gcc"
> +
>  RISCV_SBI_FW_TEXT_START ??= "0x80000000"
>  EXTRA_OEMAKE += "REPRODUCIBLE=y CROSS_COMPILE=${HOST_PREFIX}
> ELFFLAGS="${LDFLAGS}" PLATFORM=${RISCV_SBI_PLAT} I=${D}
> FW_TEXT_START=${RISCV_SBI_FW_TEXT_START}"
>  EXTRA_OEMAKE:append:toolchain-clang = " LLVM=y"
> --
> 2.52.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#229847):
> https://lists.openembedded.org/g/openembedded-core/message/229847
> Mute This Topic: https://lists.openembedded.org/mt/117401535/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 3488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core][PATCH] opensbi: force gcc toolchain
  2026-01-22 17:19 ` Khem Raj
@ 2026-02-03 17:02   ` Thomas Perrot
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Perrot @ 2026-02-03 17:02 UTC (permalink / raw)
  To: raj.khem; +Cc: thomas.perrot, openembedded-core, thomas.petazzoni


[-- Attachment #1.1: Type: text/plain, Size: 2323 bytes --]

Hello Khem,

On Thu, 2026-01-22 at 09:19 -0800, Khem Raj via lists.openembedded.org
wrote:
> 
> 
> On Thu, Jan 22, 2026 at 7:31 AM Thomas Perrot via
> lists.openembedded.org
> <thomas.perrot=bootlin.com@lists.openembedded.org> wrote:
> > From: Thomas Perrot <thomas.perrot@bootlin.com>
> > 
> > OpenSBI requires the gcc toolchain to build correctly. Set
> > TOOLCHAIN
> > explicitly to prevent build failures when using alternative
> > toolchains.
> > 
> 
> 
> I am assuming you are having issues compiling it with clang, it would
> be good to document whats going wrong.
> Since it's a bug to address, openSBI does not intend to use a
> particular compiler.
>  

We are figuring out the linker issue when Clang is used as the default
toolchain. We haven't taken the time to figure it out yet.

Kind regards,
Thomas Perrot

> > 
> > Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
> > ---
> >  meta/recipes-bsp/opensbi/opensbi_1.8.1.bb | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/meta/recipes-bsp/opensbi/opensbi_1.8.1.bb
> > b/meta/recipes-bsp/opensbi/opensbi_1.8.1.bb
> > index 0a9652c2831e..52d7b38ff2ba 100644
> > --- a/meta/recipes-bsp/opensbi/opensbi_1.8.1.bb
> > +++ b/meta/recipes-bsp/opensbi/opensbi_1.8.1.bb
> > @@ -15,6 +15,8 @@ TARGET_DBGSRC_DIR =
> > "/share/opensbi/*/generic/firmware/"
> > 
> >  TARGET_CC_ARCH += "${LDFLAGS}"
> > 
> > +TOOLCHAIN = "gcc"
> > +
> >  RISCV_SBI_FW_TEXT_START ??= "0x80000000"
> >  EXTRA_OEMAKE += "REPRODUCIBLE=y CROSS_COMPILE=${HOST_PREFIX}
> > ELFFLAGS="${LDFLAGS}" PLATFORM=${RISCV_SBI_PLAT} I=${D}
> > FW_TEXT_START=${RISCV_SBI_FW_TEXT_START}"
> >  EXTRA_OEMAKE:append:toolchain-clang = " LLVM=y"
> > 
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#229853):
> > https://lists.openembedded.org/g/openembedded-core/message/229853
> > Mute This Topic:
> > https://lists.openembedded.org/mt/117401535/5443093
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe:
> > https://lists.openembedded.org/g/openembedded-core/unsub [
> > thomas.perrot@bootlin.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> > 

-- 
Thomas Perrot, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

[-- Attachment #1.2: Type: text/html, Size: 4455 bytes --]

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-03 17:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22 15:30 [OE-core][PATCH] opensbi: force gcc toolchain thomas.perrot
2026-01-22 17:19 ` Khem Raj
2026-02-03 17:02   ` Thomas Perrot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox