[Buildroot] [PATCH v2 1/1] package/{mesa3d, mesa3d-headers}: bump version to 21.2.5

Bernd Kuhls bernd.kuhls at t-online.de
Thu Oct 28 19:49:21 UTC 2021


Add new crocus gallium driver:
https://cgit.freedesktop.org/mesa/mesa/commit/?id=f3630548f1da904ec6c63b43ece7e68afdb8867e

Added patch to fix uClibc build.

Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
---
v2: bumped to 21.2.5, git-formatted patch (Thomas)

 package/mesa3d-headers/mesa3d-headers.mk      |  2 +-
 .../0006-c11_compat.h-fix-uClibc-build.patch  | 35 +++++++++++++++++++
 package/mesa3d/Config.in                      |  7 ++++
 package/mesa3d/mesa3d.hash                    |  6 ++--
 package/mesa3d/mesa3d.mk                      |  3 +-
 5 files changed, 48 insertions(+), 5 deletions(-)
 create mode 100644 package/mesa3d/0006-c11_compat.h-fix-uClibc-build.patch

diff --git a/package/mesa3d-headers/mesa3d-headers.mk b/package/mesa3d-headers/mesa3d-headers.mk
index 233292ab0a..3698cccf78 100644
--- a/package/mesa3d-headers/mesa3d-headers.mk
+++ b/package/mesa3d-headers/mesa3d-headers.mk
@@ -12,7 +12,7 @@ endif
 
 # Not possible to directly refer to mesa3d variables, because of
 # first/second expansion trickery...
-MESA3D_HEADERS_VERSION = 21.1.8
+MESA3D_HEADERS_VERSION = 21.2.5
 MESA3D_HEADERS_SOURCE = mesa-$(MESA3D_HEADERS_VERSION).tar.xz
 MESA3D_HEADERS_SITE = https://archive.mesa3d.org
 MESA3D_HEADERS_DL_SUBDIR = mesa3d
diff --git a/package/mesa3d/0006-c11_compat.h-fix-uClibc-build.patch b/package/mesa3d/0006-c11_compat.h-fix-uClibc-build.patch
new file mode 100644
index 0000000000..06c8be2557
--- /dev/null
+++ b/package/mesa3d/0006-c11_compat.h-fix-uClibc-build.patch
@@ -0,0 +1,35 @@
+From 735485556a029ee4077b51864a9715168bd59ea9 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls at t-online.de>
+Date: Thu, 28 Oct 2021 21:31:26 +0200
+Subject: [PATCH] c11_compat.h: fix uClibc build
+
+uClibc does not define static_assert so we copy the code from the else-
+clause. Fixes build error:
+
+../src/egl/main/egldisplay.c: In function '_eglGetNativePlatformFromEnv':
+../src/egl/main/egldisplay.c:93:4: error: implicit declaration of function 'static_assert' [-Werror=implicit-function-declaration]
+   93 |    static_assert(ARRAY_SIZE(egl_platforms) == _EGL_NUM_PLATFORMS,
+      |    ^~~~~~~~~~~~~
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
+---
+ include/c11_compat.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/include/c11_compat.h b/include/c11_compat.h
+index d35740f47a4..deac48f6e9b 100644
+--- a/include/c11_compat.h
++++ b/include/c11_compat.h
+@@ -9,6 +9,9 @@
+ #if defined(__cplusplus)
+    /* This is C++ code, not C */
+ #elif (__STDC_VERSION__ >= 201112L)
++#ifndef static_assert
++#define static_assert _Static_assert
++#endif
+    /* Already C11 */
+ #else
+ 
+-- 
+2.30.2
+
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 7da9ca4f5b..c84f48413f 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -97,6 +97,13 @@ config BR2_PACKAGE_MESA3D_NEEDS_X11
 
 comment "Gallium drivers"
 
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_CROCUS
+	bool "Gallium crocus driver"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	help
+	  Mesa driver for gen4-7 Intel GPUs.
+
 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV
 	bool "Gallium Etnaviv driver"
 	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
diff --git a/package/mesa3d/mesa3d.hash b/package/mesa3d/mesa3d.hash
index 26176b85b7..af028be1cf 100644
--- a/package/mesa3d/mesa3d.hash
+++ b/package/mesa3d/mesa3d.hash
@@ -1,6 +1,6 @@
-# From https://lists.freedesktop.org/archives/mesa-announce/2021-September/000644.html
-sha256  5cd32f5d089dca75300578a3d771a656eaed652090573a2655fe4e7022d56bfc  mesa-21.1.8.tar.xz
-sha512  80fcf2b1d59b49e384e9aa1ae63a3ce709833059af1ffd8eb821054c1976709134098cfc79fac1578a2f08a003223f1c96b38e2e650c5be49821c6f2fe1047af  mesa-21.1.8.tar.xz
+# From https://lists.freedesktop.org/archives/mesa-announce/2021-October/000651.html
+sha256  8e49585fb760d973723dab6435d0c86f7849b8305b1e6d99f475138d896bacbb  mesa-21.2.5.tar.xz
+sha512  aaa1ebaa1e18eea76c3784c9a65942c3e417c1079d7bf75dcede574999dc459fb4d68d041cf2f767afb9cbfa834a985e0a4edd5a56b0fc90f8fdc506359aa5da  mesa-21.2.5.tar.xz
 
 # License
 sha256  998437f3f75f0c542046f83c1cb349408122268168fb13eb4ae6967aa18b7d98  docs/license.rst
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index dc63d8c9f4..550049d880 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -5,7 +5,7 @@
 ################################################################################
 
 # When updating the version, please also update mesa3d-headers
-MESA3D_VERSION = 21.1.8
+MESA3D_VERSION = 21.2.5
 MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
 MESA3D_SITE = https://archive.mesa3d.org
 MESA3D_LICENSE = MIT, SGI, Khronos
@@ -85,6 +85,7 @@ endif
 # Drivers
 
 #Gallium Drivers
+MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_CROCUS)   += crocus
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV)  += etnaviv
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_FREEDRENO) += freedreno
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915)     += i915
-- 
2.30.2



More information about the buildroot mailing list