Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour via buildroot <buildroot@buildroot.org>
To: Bernd Kuhls <bernd@kuhls.net>, buildroot@buildroot.org
Cc: El Mehdi YOUNES <elmehdi.younes@smile.fr>,
	Joseph Kogut <joseph.kogut@gmail.com>,
	Romain Naour <romain.naour@gmail.com>
Subject: Re: [Buildroot] [PATCH 5/6] package/mesa-libclc: new package
Date: Wed, 9 Sep 2026 16:34:03 +0200	[thread overview]
Message-ID: <03ed7bbd-66eb-456f-ad79-07188a4ea2df@smile.fr> (raw)
In-Reply-To: <20260906233048.692559-5-bernd@kuhls.net>

Hello Bernd, All,

Le 07/09/2026 à 01:30, Bernd Kuhls a écrit :
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> ---
>  DEVELOPERS                           |  1 +
>  package/Config.in                    |  1 +
>  package/mesa-libclc/Config.in        | 13 +++++++++
>  package/mesa-libclc/mesa-libclc.hash |  3 ++
>  package/mesa-libclc/mesa-libclc.mk   | 42 ++++++++++++++++++++++++++++
>  5 files changed, 60 insertions(+)
>  create mode 100644 package/mesa-libclc/Config.in
>  create mode 100644 package/mesa-libclc/mesa-libclc.hash
>  create mode 100644 package/mesa-libclc/mesa-libclc.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 1fd93b1de5..019b527f54 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -469,6 +469,7 @@ F:	package/libzippp/
>  F:	package/linux-firmware/
>  F:	package/mc/
>  F:	package/mesa3d/
> +F:	package/mesa-libclc/
>  F:	package/minidlna/
>  F:	package/mjpg-streamer/
>  F:	package/mpg123/
> diff --git a/package/Config.in b/package/Config.in
> index 307f7ce86a..b4d7f3c133 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -2271,6 +2271,7 @@ endif
>  	source "package/llvm-project/llvm/Config.in"
>  	source "package/lttng-libust/Config.in"
>  	source "package/matio/Config.in"
> +	source "package/mesa-libclc/Config.in"
>  	source "package/mpc/Config.in"
>  	source "package/mpdecimal/Config.in"
>  	source "package/mpfr/Config.in"
> diff --git a/package/mesa-libclc/Config.in b/package/mesa-libclc/Config.in
> new file mode 100644
> index 0000000000..620bfb13e8
> --- /dev/null
> +++ b/package/mesa-libclc/Config.in
> @@ -0,0 +1,13 @@
> +config BR2_PACKAGE_MESA_LIBCLC

I guess mesa-libclc and libclc should not be selected at the same time.

> +	bool "mesa-libclc"
> +	depends on BR2_PACKAGE_LLVM
> +	select BR2_PACKAGE_LLVM_AMDGPU

Why? This is usually selected by ATI/AMD driver.

> +	select BR2_PACKAGE_LLVM_RTTI

This is already selected by rusticl support that requires libclc at runtime.

> +	help
> +	  This is a fork of LLVM's libclc applying some fixes of a
> +	  known good state to be used by Mesa3D.
> +
> +	  https://gitlab.freedesktop.org/karolherbst/mesa-libclc
> +
> +comment "mesa-libclc needs llvm"
> +	depends on !BR2_PACKAGE_LLVM
> diff --git a/package/mesa-libclc/mesa-libclc.hash b/package/mesa-libclc/mesa-libclc.hash
> new file mode 100644
> index 0000000000..a03274867e
> --- /dev/null
> +++ b/package/mesa-libclc/mesa-libclc.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256  c77fc1104fbc2d254a48d2176a33cbec915dde9a48beda7a274f2e837b796386  mesa-libclc-22.1.8.3-git4.tar.gz
> +sha256  3c536c052db9afd997809e38785c9f2a9e54e2892330fa7c5b438e18a7413479  LICENSE.TXT
> diff --git a/package/mesa-libclc/mesa-libclc.mk b/package/mesa-libclc/mesa-libclc.mk
> new file mode 100644
> index 0000000000..62d7fef69e
> --- /dev/null
> +++ b/package/mesa-libclc/mesa-libclc.mk
> @@ -0,0 +1,42 @@
> +################################################################################
> +#
> +# mesa-libclc
> +#
> +################################################################################
> +
> +MESA_LIBCLC_VERSION = 22.1.8.3

This version is curently in sync with llvm-project packages version but can bump
them at anytime.

Have you considered adding mesa changes to llvm-libclc package itself?

https://gitlab.freedesktop.org/karolherbst/mesa-libclc/-/blob/main/README.md?ref_type=heads&plain=1#L19

Best regards,
Romain


> +MESA_LIBCLC_SITE = https://gitlab.freedesktop.org/karolherbst/mesa-libclc.git
> +MESA_LIBCLC_SITE_METHOD = git
> +MESA_LIBCLC_LICENSE = Apache-2.0 with exceptions or MIT
> +MESA_LIBCLC_LICENSE_FILES = LICENSE.TXT
> +MESA_LIBCLC_DEPENDENCIES = host-clang host-llvm host-spirv-llvm-translator
> +HOST_MESA_LIBCLC_DEPENDENCIES = host-clang host-llvm host-spirv-llvm-translator
> +MESA_LIBCLC_INSTALL_STAGING = YES
> +
> +# CMAKE_*_COMPILER_FORCED=ON skips testing the tools and assumes
> +# llvm-config provided values
> +#
> +# CMAKE_*_COMPILER has to be set to the host compiler to build a host
> +# 'prepare_builtins' tool used during the build process
> +#
> +# The headers are installed in /usr/share and not /usr/include,
> +# because they are needed at runtime on the target to build the OpenCL
> +# kernels.
> +MESA_LIBCLC_CONF_OPTS = \
> +	-DCMAKE_SYSROOT="" \
> +	-DCMAKE_C_COMPILER_FORCED=ON \
> +	-DCMAKE_INSTALL_DATADIR="share" \
> +	-DCMAKE_FIND_ROOT_PATH="$(HOST_DIR)" \
> +	-DCMAKE_C_FLAGS="$(HOST_CFLAGS)" \
> +	-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)" \
> +	-DLLVM_CMAKE_DIR="$(HOST_DIR)/lib/cmake/llvm" \
> +	-DLIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR="$(HOST_DIR)/bin"
> +
> +HOST_MESA_LIBCLC_CONF_OPTS = \
> +	-DLIBCLC_TARGETS_TO_BUILD=spirv64-mesa3d-
> +
> +$(eval $(cmake-package))
> +$(eval $(host-cmake-package))

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-09-09 14:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-06 23:30 [Buildroot] [PATCH 1/6] package/mesa3d: rework OpenCL handling Bernd Kuhls
2026-09-06 23:30 ` [Buildroot] [PATCH 2/6] package/mesa3d: precomp-compiler does not need target llvm Bernd Kuhls
2026-09-09 14:03   ` Romain Naour via buildroot
2026-09-06 23:30 ` [Buildroot] [PATCH 3/6] package/mesa3d: crocus Gallium driver needs precomp-compiler Bernd Kuhls
2026-09-09 14:11   ` Romain Naour via buildroot
2026-09-06 23:30 ` [Buildroot] [PATCH 4/6] package/mesa3d: i915 Gallium driver needs llvm Bernd Kuhls
2026-09-09 14:12   ` Romain Naour via buildroot
2026-09-06 23:30 ` [Buildroot] [PATCH 5/6] package/mesa-libclc: new package Bernd Kuhls
2026-09-09 14:34   ` Romain Naour via buildroot [this message]
2026-09-06 23:30 ` [Buildroot] [PATCH 6/6] package/{mesa3d, mesa3d-headers}: bump version to 26.2.2 Bernd Kuhls
2026-09-09 14:40   ` Romain Naour via buildroot
2026-09-09 13:28 ` [Buildroot] [PATCH 1/6] package/mesa3d: rework OpenCL handling Romain Naour via buildroot

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=03ed7bbd-66eb-456f-ad79-07188a4ea2df@smile.fr \
    --to=buildroot@buildroot.org \
    --cc=bernd@kuhls.net \
    --cc=elmehdi.younes@smile.fr \
    --cc=joseph.kogut@gmail.com \
    --cc=romain.naour@gmail.com \
    --cc=romain.naour@smile.fr \
    /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