[v2,2/4] package/mesa3d: enable llvm RTTI when needed
diff mbox series

Message ID 20191005094818.1956334-2-romain.naour@gmail.com
State New
Headers show
Series
  • [v2,1/4] package/llvm: add llvm RTTI option
Related show

Commit Message

Romain Naour Oct. 5, 2019, 9:48 a.m. UTC
LLVM must be built with rtti (runtime type information) support
to build the Gallium Nouveau driver or the Clover OpenCL state
tracker when llvm support is enabled in mesa3d.

Fixes the build when BR2_PACKAGE_MESA3D_OPENCL is set:
"The Clover OpenCL state tracker requires rtti, you need to turn off clover or use an LLVM built with LLVM_ENABLE_RTTI."

This check was added by mesa3d 19.1:
https://cgit.freedesktop.org/mesa/mesa/commit/?id=29912f2ea486fb8ffbc98db347679cf542422efe

Fixes the build when BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU and BR2_PACKAGE_MESA3D_LLVM are set
"The Nouveau driver requires rtti. You either need to turn off nouveau or use an LLVM built with LLVM_ENABLE_RTTI."

This check was added by mesa3d 19.0:
https://cgit.freedesktop.org/mesa/mesa/commit/?id=a2596450ac7330c8965c819491038fb1ad454333

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/mesa3d/Config.in | 2 ++
 1 file changed, 2 insertions(+)

Comments

Bernd Kuhls Oct. 5, 2019, 2:18 p.m. UTC | #1
Am Sat, 05 Oct 2019 11:48:16 +0200 schrieb Romain Naour:

> Signed-off-by: Romain Naour
> <romain.naour@gmail.com>

Tested-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[build-tested using this defconfig:
BR2_KERNEL_HEADERS_4_4=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_BINUTILS_VERSION_2_30_X=y
BR2_GCC_VERSION_5_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_INIT_NONE=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_LLVM=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU=y
BR2_PACKAGE_MESA3D_XVMC=y
BR2_PACKAGE_MESA3D_OPENGL_GLX=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_XORG7=y]

Patch
diff mbox series

diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index d9a705f991..5bec4405b7 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -49,6 +49,7 @@  config BR2_PACKAGE_MESA3D_OPENCL
 	depends on BR2_PACKAGE_MESA3D_LLVM
 	depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600 || \
 		BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
+	select BR2_PACKAGE_LLVM_RTTI
 	select BR2_PACKAGE_CLANG
 	select BR2_PACKAGE_LIBCLC
 	select BR2_PACKAGE_HAS_LIBOPENCL
@@ -122,6 +123,7 @@  config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
 	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
 	select BR2_PACKAGE_LIBDRM_NOUVEAU
 	select BR2_PACKAGE_MESA3D_NEEDS_XA
+	select BR2_PACKAGE_LLVM_RTTI if BR2_PACKAGE_MESA3D_LLVM
 	help
 	  Supports all Nvidia GPUs.