diff mbox series

[PATCH/next,1/2] package/mesa3d: fix uClibc build

Message ID 20221204153511.37857-1-bernd.kuhls@t-online.de
State Superseded
Headers show
Series [PATCH/next,1/2] package/mesa3d: fix uClibc build | expand

Commit Message

Bernd Kuhls Dec. 4, 2022, 3:35 p.m. UTC
Moved the util/compiler.h include to util/macros.h due to upstream
commit which added static_assert() to src/util/macros.h
https://cgit.freedesktop.org/mesa/mesa/commit/src/util/macros.h?h=22.2&id=f1023571e8ce7ccb6ec7bc115240cb76aef3e5e5

Please note that this patch can be removed when buildroot toolchains
are updated to uClibc 1.0.42:
https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?h=v1.0.42&id=03fbd941e943976bb92cb392882c2ff7ec218704

Fixes:
http://autobuild.buildroot.net/results/a55/a55d6980faad8b5063f8f4f8b89467061d44a2ae/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
cherry-picked from master branch:
https://git.busybox.net/buildroot/commit/package/mesa3d?id=6ebfe647b6df76016fb8a50b718d60fdff15fe87

 package/mesa3d/0004-Fix-uClibc-build.patch | 37 ++++++++++++----------
 1 file changed, 21 insertions(+), 16 deletions(-)
diff mbox series

Patch

diff --git a/package/mesa3d/0004-Fix-uClibc-build.patch b/package/mesa3d/0004-Fix-uClibc-build.patch
index 70ff5e2b4c..c8c82fe0dc 100644
--- a/package/mesa3d/0004-Fix-uClibc-build.patch
+++ b/package/mesa3d/0004-Fix-uClibc-build.patch
@@ -18,29 +18,22 @@  Fixes build errors with uClibc and gcc-9.3.0:
  function ‘static_assert’ [-Werror=implicit-function-declaration] 101 |
  static_assert(ARRAY_SIZE(egl_platforms) == _EGL_NUM_PLATFORMS,
 
+../src/util/macros.h:74:4: error: implicit declaration of function
+ ‘static_assert’ [-Werror=implicit-function-declaration]
+   74 |    static_assert(cond, #cond); \
+      |    ^~~~~~~~~~~~~
+
 Patch sent upstream:
 https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13898
 
 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
 ---
- src/egl/main/egldisplay.c |  1 +
- src/util/compiler.h       | 10 ++++++++++
+ src/util/compiler.h | 10 ++++++++++
+ src/util/macros.h   |  1 +
  2 files changed, 11 insertions(+)
 
-diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
-index 131fc22786f9..d3e2bb96e2f6 100644
---- a/src/egl/main/egldisplay.c
-+++ b/src/egl/main/egldisplay.c
-@@ -42,6 +42,7 @@
- #endif
- #include <fcntl.h>
- #include "c11/threads.h"
-+#include "util/compiler.h"
- #include "util/macros.h"
- #include "util/os_file.h"
- #include "util/u_atomic.h"
 diff --git a/src/util/compiler.h b/src/util/compiler.h
-index d184ad455af9..b5c56807acc6 100644
+index d184ad455af..b5c56807acc 100644
 --- a/src/util/compiler.h
 +++ b/src/util/compiler.h
 @@ -36,6 +36,16 @@
@@ -60,6 +53,18 @@  index d184ad455af9..b5c56807acc6 100644
  #include "util/macros.h"
  
  
+diff --git a/src/util/macros.h b/src/util/macros.h
+index 22b18303826..8f73ee72693 100644
+--- a/src/util/macros.h
++++ b/src/util/macros.h
+@@ -27,6 +27,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include <stdint.h>
++#include "util/compiler.h"
+ 
+ /* Compute the size of an array */
+ #ifndef ARRAY_SIZE
 -- 
-GitLab
+2.34.1