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

Bernd Kuhls bernd.kuhls at t-online.de
Fri Oct 15 16:26:12 UTC 2021


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

Add patch to fix build error.

Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
---
v2: Add patch to fix build error

 package/mesa3d-headers/mesa3d-headers.mk    |  2 +-
 package/mesa3d/0006-fix-cpp-detection.patch | 23 +++++++++++++++++++++
 package/mesa3d/Config.in                    |  7 +++++++
 package/mesa3d/mesa3d.hash                  |  6 +++---
 package/mesa3d/mesa3d.mk                    |  3 ++-
 5 files changed, 36 insertions(+), 5 deletions(-)
 create mode 100644 package/mesa3d/0006-fix-cpp-detection.patch

diff --git a/package/mesa3d-headers/mesa3d-headers.mk b/package/mesa3d-headers/mesa3d-headers.mk
index 233292ab0a..2048d2ca03 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.4
 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-fix-cpp-detection.patch b/package/mesa3d/0006-fix-cpp-detection.patch
new file mode 100644
index 0000000000..7e78eef1dd
--- /dev/null
+++ b/package/mesa3d/0006-fix-cpp-detection.patch
@@ -0,0 +1,23 @@
+Fix c++ detection
+
+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>
+
+diff -uNr mesa-21.2.0-rc1.orig/include/c11_compat.h mesa-21.2.0-rc1/include/c11_compat.h
+--- mesa-21.2.0-rc1.orig/include/c11_compat.h	2021-07-14 20:29:07.317889700 +0200
++++ mesa-21.2.0-rc1/include/c11_compat.h	2021-07-18 16:33:46.663723621 +0200
+@@ -8,8 +8,6 @@
+ 
+ #if defined(__cplusplus)
+    /* This is C++ code, not C */
+-#elif (__STDC_VERSION__ >= 201112L)
+-   /* Already C11 */
+ #else
+ 
+ 
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 82a40511f1..1743b85f70 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..05fb99cbbe 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/000648.html
+sha256  fe6ede82d1ac02339da3c2ec1820a379641902fd351a52cc01153f76eff85b44  mesa-21.2.4.tar.xz
+sha512  245915260b1366beed15d4790e09d050352614daaea2ed052128d54f26dda202d7abf125b9fa5098ef77604b18977b0ce4209df51746d123871ebf8708f7425d  mesa-21.2.4.tar.xz
 
 # License
 sha256  998437f3f75f0c542046f83c1cb349408122268168fb13eb4ae6967aa18b7d98  docs/license.rst
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index dc63d8c9f4..2172657040 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.4
 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