From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Bernd Kuhls <bernd@kuhls.net>
Cc: buildroot@buildroot.org, Daniel Lang <dalang@gmx.at>,
Romain Naour <romain.naour@gmail.com>,
Valentin Korenblit <valentinkorenblit@gmail.com>
Subject: Re: [Buildroot] [PATCH 1/2] package/llvm-project/libclc: fix build with llvm 23
Date: Thu, 15 Oct 2026 22:14:05 +0200 [thread overview]
Message-ID: <atEzse9YpghEz6bC@windsurf> (raw)
In-Reply-To: <20261013215825.319471-1-bernd@kuhls.net>
Hello,
On Tue, Oct 13, 2026 at 11:58:24PM +0200, Bernd Kuhls wrote:
> Buildroot commit 5f79161e4a8756acdb25c8500de9b2dee663f2ac bumped the
> llvm packages from 22.1.8 to 23.1.0 causing configure errors with the
> libclc package:
>
> -- Check for working CLC compiler: /usr/bin/gcc
> CMake Error at cmake/modules/CMakeTestCLCCompiler.cmake:29 (message):
> The CLC compiler
>
> /usr/bin/gcc
>
> is not able to compile a simple OpenCL test program.
>
> Output:
>
> gcc: error: unrecognized command-line option
> '--target=spirv64-unknown-unknown'
>
> Update various configure options to detect the correct host compiler.
>
> Add post install hooks to create symlink which is needed for mesa3d to
> detect libclc.
> Fixes tests.package.test_mesa3d.TestMesa3DRusticl.test_run:
>
> Libclc failed to load. Please make sure it is installed and provides
> spirv-mesa3d-.spv and/or spirv64-mesa3d-.spv
>
> For details see
> https://gitlab.archlinux.org/archlinux/packaging/packages/libclc/-/commit/ca75c4b19c76ae856a368d070d914b12f71203a5#line_9b9baac1e_A71
>
> Fixes:
> https://autobuild.buildroot.net/results/3fc/3fcdcb71be590b090df2f765c68aeaecc44dd215/
>
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Thanks for having looked at this problem. Some questions below.
> ---
> package/llvm-project/libclc/libclc.mk | 21 ++++++++++++++++++---
> 1 file changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/package/llvm-project/libclc/libclc.mk b/package/llvm-project/libclc/libclc.mk
> index ff00871747..cefdca63d4 100644
> --- a/package/llvm-project/libclc/libclc.mk
> +++ b/package/llvm-project/libclc/libclc.mk
> @@ -36,13 +36,28 @@ LIBCLC_CONF_OPTS = \
> -DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)" \
> -DCMAKE_SHARED_LINKER_FLAGS="$(HOST_LDFLAGS)" \
> -DCMAKE_MODULE_LINKER_FLAGS="$(HOST_LDFLAGS)" \
> - -DCMAKE_C_COMPILER="$(CMAKE_HOST_C_COMPILER)" \
> - -DCMAKE_CXX_COMPILER="$(CMAKE_HOST_CXX_COMPILER)" \
So we were using gcc
> + -DCMAKE_C_COMPILER="$(HOST_DIR)/bin/clang" \
> + -DCMAKE_CXX_COMPILER="$(HOST_DIR)/bin/clang" \
and now we're using clang? Is that what the change is about?
> -DLLVM_CMAKE_DIR="$(HOST_DIR)/lib/cmake/llvm" \
> + -DLIBCLC_TARGET=spirv64-unknown-unknown \
> -DLIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR="$(HOST_DIR)/bin"
>
> HOST_LIBCLC_CONF_OPTS = \
> - -DLIBCLC_TARGETS_TO_BUILD=spirv64-mesa3d-
> + -DCMAKE_C_COMPILER_FORCED=ON \
> + -DCMAKE_CXX_COMPILER_FORCED=ON \
> + -DCMAKE_C_COMPILER="$(HOST_DIR)/bin/clang" \
> + -DCMAKE_CXX_COMPILER="$(HOST_DIR)/bin/clang" \
> + -DLIBCLC_TARGET=spirv64-unknown-unknown
Is it correct to have the same -DLIBCLC_TARGET=spirv64-unknown-unknown
value passed to both the host and target package? What does that
do/mean excactly?
> +define LIBCLC_LINK_STAGING_SPV
> + ln -sf spirv64-unknown-unknown/libclc.spv $(STAGING_DIR)/usr/share/clc/spirv64-mesa3d-.spv
> +endef
> +LIBCLC_POST_INSTALL_STAGING_HOOKS += LIBCLC_LINK_STAGING_SPV
> +
> +define LIBCLC_LINK_TARGET_SPV
> + ln -sf spirv64-unknown-unknown/libclc.spv $(TARGET_DIR)/usr/share/clc/spirv64-mesa3d-.spv
> +endef
> +LIBCLC_POST_INSTALL_TARGET_HOOKS += LIBCLC_LINK_TARGET_SPV
A comment above those, perhaps replicating the comment from the
ArchLinux package, would be good to have.
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2026-10-15 20:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 21:58 [Buildroot] [PATCH 1/2] package/llvm-project/libclc: fix build with llvm 23 Bernd Kuhls
2026-10-13 21:58 ` [Buildroot] [PATCH 2/2] package/llvm-project/libclc: apply mesa-libclc patch set Bernd Kuhls
2026-10-15 20:14 ` Thomas Petazzoni via buildroot [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=atEzse9YpghEz6bC@windsurf \
--to=buildroot@buildroot.org \
--cc=bernd@kuhls.net \
--cc=dalang@gmx.at \
--cc=romain.naour@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=valentinkorenblit@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