From: Bernd Kuhls <bernd@kuhls.net>
To: buildroot@buildroot.org
Cc: Daniel Lang <dalang@gmx.at>,
El Mehdi YOUNES <elmehdi.younes@smile.fr>,
Joseph Kogut <joseph.kogut@gmail.com>,
Romain Naour <romain.naour@gmail.com>,
Valentin Korenblit <valentinkorenblit@gmail.com>
Subject: [Buildroot] [PATCH v2 3/6] package/mesa3d: precomp-compiler does not need target llvm
Date: Sun, 20 Sep 2026 23:39:03 +0200 [thread overview]
Message-ID: <20260920213906.905956-3-bernd@kuhls.net> (raw)
In-Reply-To: <20260920213906.905956-1-bernd@kuhls.net>
Inspired by and fixes
https://gitlab.com/buildroot.org/buildroot/-/work_items/180
To build binaries provided by the host-mesa3d package we do not need to
build llvm packages for the target arch.
Added configure options for rtti support to fix build error when
BR2_PACKAGE_LLVM_RTTI is not enabled:
output/build/host-mesa3d-26.2.3/meson.build:2042:8: ERROR: Problem
encountered: LLVM was built without RTTI, so Mesa must also disable
RTTI. Use an LLVM built with LLVM_ENABLE_RTTI or add cpp_rtti=false.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
v2: added note about new rtti configure options (Romain)
package/mesa3d/Config.in | 46 +++++++++++++++++++++++-----------------
package/mesa3d/mesa3d.mk | 8 ++++++-
2 files changed, 33 insertions(+), 21 deletions(-)
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index cb86e6a2a4..feed6b68fe 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -23,8 +23,7 @@ config BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS
config BR2_PACKAGE_MESA3D_NEEDS_PRECOMP_COMPILER
bool
- select BR2_PACKAGE_SPIRV_LLVM_TRANSLATOR
- select BR2_PACKAGE_SPIRV_TOOLS
+ select BR2_HOST_CMAKE_AT_LEAST_3_20 # host-llvm
config BR2_PACKAGE_MESA3D_LLVM
bool "llvm support"
@@ -147,15 +146,17 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS
bool "Gallium iris driver"
- depends on BR2_PACKAGE_MESA3D_LLVM
+ depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS # host-llvm
+ depends on BR2_HOST_GCC_AT_LEAST_7 # host-llvm
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_MESA3D_NEEDS_PRECOMP_COMPILER
select BR2_PACKAGE_MESA3D_RUSTICL_SUPPORTED_DRIVER
help
Mesa driver for iris-based Intel GPUs.
-comment "iris driver needs llvm"
- depends on !BR2_PACKAGE_MESA3D_LLVM
+comment "iris driver needs host gcc >= 7"
+ depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
+ depends on !BR2_HOST_GCC_AT_LEAST_7
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA
bool "Gallium lima driver"
@@ -189,15 +190,17 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_PANFROST
bool "Gallium panfrost driver"
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence
- depends on BR2_PACKAGE_MESA3D_LLVM
+ depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS # host-llvm
+ depends on BR2_HOST_GCC_AT_LEAST_7 # host-llvm
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_MESA3D_NEEDS_PRECOMP_COMPILER
select BR2_PACKAGE_MESA3D_RUSTICL_SUPPORTED_DRIVER
help
Mesa driver for ARM Mali Midgard and Bifrost GPUs.
-comment "panfrost driver needs llvm"
- depends on !BR2_PACKAGE_MESA3D_LLVM
+comment "panfrost driver needs host gcc >= 7"
+ depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
+ depends on !BR2_HOST_GCC_AT_LEAST_7
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R300
bool "Gallium Radeon R300 driver"
@@ -360,46 +363,49 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_IMAGINATION
bool "Vulkan imagination driver"
depends on BR2_arm || BR2_aarch64
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence
- depends on BR2_PACKAGE_MESA3D_LLVM
+ depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS # host-llvm
+ depends on BR2_HOST_GCC_AT_LEAST_7 # host-llvm
select BR2_PACKAGE_MESA3D_NEEDS_PRECOMP_COMPILER
select BR2_PACKAGE_MESA3D_VULKAN_DRIVER
help
Vulkan imagination driver.
-comment "imagination vulkan needs llvm"
- depends on !BR2_PACKAGE_MESA3D_LLVM
+comment "imagination vulkan driver needs host gcc >= 7"
+ depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
+ depends on !BR2_HOST_GCC_AT_LEAST_7
config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL
bool "Vulkan Intel driver"
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h
depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert
- depends on BR2_PACKAGE_MESA3D_LLVM
+ depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS # host-llvm
+ depends on BR2_HOST_GCC_AT_LEAST_7 # host-llvm
select BR2_PACKAGE_MESA3D_NEEDS_PRECOMP_COMPILER
select BR2_PACKAGE_MESA3D_VULKAN_DRIVER
help
Vulkan driver for Intel hardware from Ivy Bridge onward.
-comment "intel vulkan needs llvm"
- depends on !BR2_PACKAGE_MESA3D_LLVM
-
-comment "intel vulkan needs a glibc toolchain w/ headers >= 3.17"
+comment "intel vulkan driver needs a glibc toolchain w/ headers >= 3.17, host gcc >= 7"
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7
+ depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 || \
- !BR2_TOOLCHAIN_USES_GLIBC
+ !BR2_TOOLCHAIN_USES_GLIBC || !BR2_HOST_GCC_AT_LEAST_7
config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_PANFROST
bool "Vulkan panfrost driver"
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence
- depends on BR2_PACKAGE_MESA3D_LLVM
+ depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS # host-llvm
+ depends on BR2_HOST_GCC_AT_LEAST_7 # host-llvm
select BR2_PACKAGE_LLVM_RTTI if BR2_PACKAGE_MESA3D_LLVM
select BR2_PACKAGE_MESA3D_NEEDS_PRECOMP_COMPILER
select BR2_PACKAGE_MESA3D_VULKAN_DRIVER
help
Vulkan panfrost driver.
-comment "panfrost vulkan needs llvm"
- depends on !BR2_PACKAGE_MESA3D_LLVM
+comment "panfrost vulkan driver needs host gcc >= 7"
+ depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
+ depends on !BR2_HOST_GCC_AT_LEAST_7
config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_SWRAST
bool "Vulkan swrast driver"
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index c103345e86..04112eea8e 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -178,7 +178,7 @@ endif
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_PRECOMP_COMPILER),y)
MESA3D_CONF_OPTS += -Dmesa-clc=system -Dprecomp-compiler=system
-MESA3D_DEPENDENCIES += host-mesa3d spirv-llvm-translator spirv-tools
+MESA3D_DEPENDENCIES += host-mesa3d
endif
ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),)
@@ -347,6 +347,12 @@ HOST_MESA3D_CONF_OPTS = \
-Dglx=disabled \
-Dvulkan-drivers=""
+ifeq ($(BR2_PACKAGE_LLVM_RTTI),y)
+HOST_MESA3D_CONF_OPTS += -Dcpp_rtti=true
+else
+HOST_MESA3D_CONF_OPTS += -Dcpp_rtti=false
+endif
+
HOST_MESA3D_DEPENDENCIES = \
host-libclc \
host-libdrm \
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-09-20 21:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 21:39 [Buildroot] [PATCH v2 1/6] package/llvm-project/libclc: apply mesa-libclc patch set Bernd Kuhls
2026-09-20 21:39 ` [Buildroot] [PATCH v2 2/6] package/mesa3d: rework OpenCL handling Bernd Kuhls
2026-09-20 21:39 ` Bernd Kuhls [this message]
2026-09-20 21:39 ` [Buildroot] [PATCH v2 4/6] package/mesa3d: crocus Gallium driver needs precomp-compiler Bernd Kuhls
2026-09-20 21:39 ` [Buildroot] [PATCH v2 5/6] package/mesa3d: i915 Gallium driver needs llvm Bernd Kuhls
2026-09-20 21:39 ` [Buildroot] [PATCH v2 6/6] package/{mesa3d, mesa3d-headers}: bump version to 26.2.3 Bernd Kuhls
2026-10-03 21:19 ` Julien Olivain 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=20260920213906.905956-3-bernd@kuhls.net \
--to=bernd@kuhls.net \
--cc=buildroot@buildroot.org \
--cc=dalang@gmx.at \
--cc=elmehdi.younes@smile.fr \
--cc=joseph.kogut@gmail.com \
--cc=romain.naour@gmail.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 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.