All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/mesa3d: fix uClibc build
@ 2022-11-16 18:04 Bernd Kuhls
  2022-11-21 21:21 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2022-11-16 18:04 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

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>
---
 package/mesa3d/0004-Fix-uClibc-build.patch | 37 ++++++++++++----------
 1 file changed, 21 insertions(+), 16 deletions(-)

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
 
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-21 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-16 18:04 [Buildroot] [PATCH 1/1] package/mesa3d: fix uClibc build Bernd Kuhls
2022-11-21 21:21 ` Thomas Petazzoni via buildroot

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.