All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Schulz <quentin.schulz@cherry.de>
To: Harish.Sadineni@windriver.com, openembedded-core@lists.openembedded.org
Cc: ross.burton@arm.com, Sundeep.Kokkonda@windriver.com
Subject: Re: [OE-core] [PATCH] u-boot: add support for Clang toolchain
Date: Tue, 11 Aug 2026 14:13:07 +0200	[thread overview]
Message-ID: <274b9268-b499-44b7-9297-628de8facb23@cherry.de> (raw)
In-Reply-To: <20260811105603.3447122-1-Harish.Sadineni@windriver.com>

Hi Harish,

On 8/11/26 12:56 PM, Sadineni, Harish via lists.openembedded.org wrote:
> From: Harish Sadineni <Harish.Sadineni@windriver.com>
> 
> Fix build issues that occur when the Clang toolchain is selected.
> 
> Remove the hard-coded TOOLCHAIN = "gcc" behavior and make the target compiler
> selection conditional on TOOLCHAIN. This preserves GCC as the default compiler
> while allowing Clang to be selected when TOOLCHAIN = "clang".
> 
> YOCTO [#16385]
> 
> Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
> ---
>   meta/recipes-bsp/u-boot/u-boot.inc | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
> index 00a12f1bb9..2197039dbc 100644
> --- a/meta/recipes-bsp/u-boot/u-boot.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot.inc
> @@ -3,10 +3,6 @@ PROVIDES = "virtual/bootloader"
>   
>   PACKAGE_ARCH = "${MACHINE_ARCH}"
>   
> -# u-boot is best built with gcc
> -# https://docs.u-boot-project.org/en/latest/build/clang.html
> -TOOLCHAIN = "gcc"
> -
>   DEPENDS += "${@bb.utils.contains('UBOOT_ENV_SUFFIX', 'scr', 'u-boot-mkimage-native', '', d)}"
>   DEPENDS += "${@ 'u-boot-mkenvimage-native' if bb.utils.to_boolean(d.getVar('UBOOT_INITIAL_ENV_BINARY')) else ''}"
>   
> @@ -15,7 +11,7 @@ inherit uboot-config uboot-extlinux-config uboot-sign deploy python3native
>   DEPENDS += "swig-native"
>   
>   EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} V=1'
> -EXTRA_OEMAKE += 'CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP}"'
> +EXTRA_OEMAKE += 'CC="${TARGET_PREFIX}${@bb.utils.contains('TOOLCHAIN', 'clang', 'clang', 'gcc', d)} ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP}"'

Why not simply ${TOOLCHAIN}?

Have you checked we can build u-boot-tools, u-boot-tools-native and 
nativesdk-u-boot-tools with clang?

Cheers,
Quentin


  reply	other threads:[~2026-08-11 12:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11 10:56 [PATCH] u-boot: add support for Clang toolchain Harish.Sadineni
2026-08-11 12:13 ` Quentin Schulz [this message]
2026-08-11 12:21   ` [OE-core] " Ross Burton
2026-08-11 12:32     ` Quentin Schulz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=274b9268-b499-44b7-9297-628de8facb23@cherry.de \
    --to=quentin.schulz@cherry.de \
    --cc=Harish.Sadineni@windriver.com \
    --cc=Sundeep.Kokkonda@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.