From: "Paul Barker" <paul@pbarker.dev>
To: "Khem Raj" <raj.khem@gmail.com>,
<openembedded-core@lists.openembedded.org>
Cc: "Khem Raj" <khem.raj@oss.qualcomm.com>
Subject: Re: [PATCH] ptest, packagegroup-core-buildessential: Add clang with clang toolchain
Date: Thu, 26 Nov 2026 14:51:37 +0000 [thread overview]
Message-ID: <DN586TPOAFWC.N39E3XAGLMVS@pbarker.dev> (raw)
In-Reply-To: <20261108204650.3577385-1-khem.raj@oss.qualcomm.com>
On Sun Nov 8, 2026 at 8:46 PM GMT, Khem Raj wrote:
> When the target is built with the clang toolchain, python's sysconfig
> and perl's Config record ${TARGET_PREFIX}clang as the C compiler, so
> anything compiling on the target through them fails when only gcc is
> installed:
>
> FileNotFoundError: [Errno 2] No such file or directory: 'x86_64-yoe-linux-clang'
>
> The target clang package installs the ${TARGET_PREFIX}clang symlinks.
> Add it to packagegroup-core-buildessential, and in ptest.bbclass append
> it to the ptest RDEPENDS of any recipe built with clang whose ptest
> already pulls in gcc, g++, their -symlinks packages or
> packagegroup-core-buildessential. This covers python3, python3-cffi,
> elfutils and others without per-recipe appends.
>
> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
> ---
> meta/classes-recipe/ptest.bbclass | 8 ++++++++
> .../packagegroups/packagegroup-core-buildessential.bb | 1 +
> 2 files changed, 9 insertions(+)
>
> diff --git a/meta/classes-recipe/ptest.bbclass b/meta/classes-recipe/ptest.bbclass
> index 0f80fbc1d8..de77089002 100644
> --- a/meta/classes-recipe/ptest.bbclass
> +++ b/meta/classes-recipe/ptest.bbclass
> @@ -136,6 +136,14 @@ python () {
> if not(d.getVar('PTEST_ENABLED') == "1"):
> for i in ['do_configure_ptest_base', 'do_compile_ptest_base', 'do_install_ptest_base']:
> bb.build.deltask(i, d)
> +
> + # On-target compile tests need the clang driver when built with clang
> + if d.getVar('TCOVERRIDE') == 'toolchain-clang':
> + var = 'RDEPENDS:%s-ptest' % d.getVar('PN')
> + rdeps = bb.utils.explode_deps(d.getVar(var) or '')
> + if any(p in rdeps for p in ('gcc', 'gcc-symlinks', 'g++', 'g++-symlinks',
> + 'packagegroup-core-buildessential')):
> + d.appendVar(var, ' clang')
> }
>
> QARECIPETEST[missing-ptest] = "package_qa_check_missing_ptest"
> diff --git a/meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb b/meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb
> index 2cd67ad05f..d33af54d26 100644
> --- a/meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb
> +++ b/meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb
> @@ -29,3 +29,4 @@ RDEPENDS:packagegroup-core-buildessential = "\
> pkgconfig \
> "
>
> +RDEPENDS:packagegroup-core-buildessential:append:toolchain-clang = " clang"
Hi Khem,
One comment in addition to what Ross has said.
When using clang, this patch is adding clang to the dependencies of
packagegroup-core-buildessential in both ways. I think we can just keep
the RDEPENDS append in packagegroup-core-buildessential.bb and drop
packagegroup-core-buildessential from the list to be modified in
ptest.bbclass.
Best regards,
--
Paul Barker
prev parent reply other threads:[~2026-11-26 14:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 20:46 [PATCH] ptest, packagegroup-core-buildessential: Add clang with clang toolchain Khem Raj
2026-11-12 14:25 ` [OE-core] " Ross Burton
2026-11-15 21:05 ` Khem Raj
2026-11-26 14:51 ` Paul Barker [this message]
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=DN586TPOAFWC.N39E3XAGLMVS@pbarker.dev \
--to=paul@pbarker.dev \
--cc=khem.raj@oss.qualcomm.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox