package/mesa3d: remove old patch for uClibc
authorRomain Naour <romain.naour@gmail.com>
Sat, 4 Nov 2017 16:01:25 +0000 (17:01 +0100)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sun, 5 Nov 2017 16:57:10 +0000 (17:57 +0100)
This patch is no longer necessary since Buildroot is using uClibc-ng
and the patch [1] as been merged upstream.
It's 2017 and uClibc toolchains have been rebuild with uClibc-ng.

Drop upstream patch and rename remaining one.

[1] https://cgit.openadk.org/cgi/cgit/uclibc-ng.git/commit/?id=6c4538905e65ceb203f59aaa9a61728e81c6bc0a

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/mesa3d/0001-Fix-runtime-error-with-uClibc.patch [deleted file]
package/mesa3d/0001-musl.patch [new file with mode: 0644]
package/mesa3d/0002-Fix-endianess-detection-with-musl-based-toolchains.patch [new file with mode: 0644]
package/mesa3d/0002-musl.patch [deleted file]
package/mesa3d/0003-Fix-endianess-detection-with-musl-based-toolchains.patch [deleted file]
package/mesa3d/0003-configure.ac-invert-order-for-wayland-scanner-check.patch [new file with mode: 0644]
package/mesa3d/0004-configure.ac-invert-order-for-wayland-scanner-check.patch [deleted file]

diff --git a/package/mesa3d/0001-Fix-runtime-error-with-uClibc.patch b/package/mesa3d/0001-Fix-runtime-error-with-uClibc.patch
deleted file mode 100644 (file)
index 59627be..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-Fix runtime error with uClibc
-
-Patch inspired by
-https://www.winehq.org/pipermail/wine-bugs/2011-September/288987.html
-http://git.alpinelinux.org/cgit/aports/tree/main/wine/uclibc-fmaxf-fminf.patch?id=c9b491b6099eec02a835ffd05539b5c783c6c43a
-
-Starting an app using mesa3d 10.5.x, Kodi for example, fails:
-
-/usr/lib/kodi/kodi.bin: symbol 'fminf': can't resolve symbol in lib '/usr/lib/dri/i965_dri.so'.
-libGL error: unable to load driver: i965_dri.so
-libGL error: driver pointer missing
-libGL error: failed to load driver: i965
-libGL error: unable to load driver: swrast_dri.so
-libGL error: failed to load driver: swrast
-
-This patch was rejected by upstream mesa3d:
-http://lists.freedesktop.org/archives/mesa-dev/2015-March/079436.html
-
-The real fix was committed to uClibc:
-http://git.uclibc.org/uClibc/commit/?id=6c4538905e65ceb203f59aaa9a61728e81c6bc0a
-
-Until the external toolchains do not contain this uClibc patch we keep this
-patch: http://lists.busybox.net/pipermail/buildroot/2015-March/123410.html
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
-diff -uNr mesa-10.5.3.org/src/glsl/nir/nir_constant_expressions.c mesa-10.5.3/src/glsl/nir/nir_constant_expressions.c
---- mesa-10.5.3.org/src/compiler/nir/nir_constant_expressions.c        2015-04-12 23:31:29.000000000 +0200
-+++ mesa-10.5.3/src/compiler/nir/nir_constant_expressions.c    2015-04-13 19:59:37.819786541 +0200
-@@ -48,6 +48,18 @@
- }
- #endif
-+#ifdef __UCLIBC__
-+float fmaxf(float a, float b)
-+{
-+      return (a > b) ? a : b;
-+}
-+
-+float fminf(float a, float b)
-+{
-+      return (a < b) ? a : b;
-+}
-+#endif
-+
- /**
-  * Evaluate one component of packSnorm4x8.
-  */
diff --git a/package/mesa3d/0001-musl.patch b/package/mesa3d/0001-musl.patch
new file mode 100644 (file)
index 0000000..8f7ba77
--- /dev/null
@@ -0,0 +1,18 @@
+Fix musl build
+
+Downloaded from
+http://git.alpinelinux.org/cgit/aports/plain/main/mesa/musl-fixes.patch
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+--- ./src/gallium/winsys/svga/drm/vmw_screen.h.orig
++++ ./src/gallium/winsys/svga/drm/vmw_screen.h
+@@ -34,7 +34,7 @@
+ #ifndef VMW_SCREEN_H_
+ #define VMW_SCREEN_H_
+-
++#include <sys/stat.h>
+ #include "pipe/p_compiler.h"
+ #include "pipe/p_state.h"
diff --git a/package/mesa3d/0002-Fix-endianess-detection-with-musl-based-toolchains.patch b/package/mesa3d/0002-Fix-endianess-detection-with-musl-based-toolchains.patch
new file mode 100644 (file)
index 0000000..656705b
--- /dev/null
@@ -0,0 +1,65 @@
+From 61b076689b6308b1c9d0d84ee8654a47e65e67ae Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
+Date: Fri, 4 Nov 2016 19:44:37 +0100
+Subject: [PATCH 1/1] Fix endianess detection with musl-based toolchains
+
+Musl does not define __GLIBC__ and will not provide a __MUSL__ macro:
+http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F
+
+This patch checks for the presence of endian.h and promotes the result
+to src/amd/Makefile.addrlib.am which executes the broken build command.
+Fixes compile errors detected by the autobuilder infrastructure of the
+buildroot project:
+
+http://autobuild.buildroot.net/results/e27/e27a9a95f72dba3076549beb2a2ccfdbea2fcfee/
+http://autobuild.buildroot.net/results/e27/e27a9a95f72dba3076549beb2a2ccfdbea2fcfee/
+
+Patch sent upstream: https://patchwork.freedesktop.org/patch/119961/
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ configure.ac                | 1 +
+ src/amd/Makefile.addrlib.am | 1 +
+ src/util/u_endian.h         | 2 +-
+ 3 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4761c59..7991b52 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -786,6 +786,7 @@ fi
+ AC_HEADER_MAJOR
+ AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"])
+ AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
++AC_CHECK_HEADER([endian.h], [DEFINES="$DEFINES -DHAVE_ENDIAN_H"])
+ AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
+ AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"])
+diff --git a/src/amd/Makefile.addrlib.am b/src/amd/Makefile.addrlib.am
+index 64823fc..4e2fb1d 100644
+--- a/src/amd/Makefile.addrlib.am
++++ b/src/amd/Makefile.addrlib.am
+@@ -28,6 +28,7 @@ addrlib_libamdgpu_addrlib_la_CPPFLAGS = \
+       -I$(srcdir)/addrlib/core \
+       -I$(srcdir)/addrlib/inc/chip/r800 \
+       -I$(srcdir)/addrlib/r800/chip \
++      $(DEFINES) \
+       -DBRAHMA_BUILD=1
+ addrlib_libamdgpu_addrlib_la_CXXFLAGS = \
+diff --git a/src/util/u_endian.h b/src/util/u_endian.h
+index b9d563d..266fb4a 100644
+--- a/src/util/u_endian.h
++++ b/src/util/u_endian.h
+@@ -27,7 +27,7 @@
+ #ifndef U_ENDIAN_H
+ #define U_ENDIAN_H
+-#if defined(__GLIBC__) || defined(ANDROID)
++#if defined(__GLIBC__) || defined(ANDROID) || defined(HAVE_ENDIAN_H)
+ #include <endian.h>
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+-- 
+2.10.1
+
diff --git a/package/mesa3d/0002-musl.patch b/package/mesa3d/0002-musl.patch
deleted file mode 100644 (file)
index 8f7ba77..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-Fix musl build
-
-Downloaded from
-http://git.alpinelinux.org/cgit/aports/plain/main/mesa/musl-fixes.patch
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-
---- ./src/gallium/winsys/svga/drm/vmw_screen.h.orig
-+++ ./src/gallium/winsys/svga/drm/vmw_screen.h
-@@ -34,7 +34,7 @@
- #ifndef VMW_SCREEN_H_
- #define VMW_SCREEN_H_
--
-+#include <sys/stat.h>
- #include "pipe/p_compiler.h"
- #include "pipe/p_state.h"
diff --git a/package/mesa3d/0003-Fix-endianess-detection-with-musl-based-toolchains.patch b/package/mesa3d/0003-Fix-endianess-detection-with-musl-based-toolchains.patch
deleted file mode 100644 (file)
index 656705b..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-From 61b076689b6308b1c9d0d84ee8654a47e65e67ae Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <bernd.kuhls@t-online.de>
-Date: Fri, 4 Nov 2016 19:44:37 +0100
-Subject: [PATCH 1/1] Fix endianess detection with musl-based toolchains
-
-Musl does not define __GLIBC__ and will not provide a __MUSL__ macro:
-http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F
-
-This patch checks for the presence of endian.h and promotes the result
-to src/amd/Makefile.addrlib.am which executes the broken build command.
-Fixes compile errors detected by the autobuilder infrastructure of the
-buildroot project:
-
-http://autobuild.buildroot.net/results/e27/e27a9a95f72dba3076549beb2a2ccfdbea2fcfee/
-http://autobuild.buildroot.net/results/e27/e27a9a95f72dba3076549beb2a2ccfdbea2fcfee/
-
-Patch sent upstream: https://patchwork.freedesktop.org/patch/119961/
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- configure.ac                | 1 +
- src/amd/Makefile.addrlib.am | 1 +
- src/util/u_endian.h         | 2 +-
- 3 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 4761c59..7991b52 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -786,6 +786,7 @@ fi
- AC_HEADER_MAJOR
- AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"])
- AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
-+AC_CHECK_HEADER([endian.h], [DEFINES="$DEFINES -DHAVE_ENDIAN_H"])
- AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
- AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"])
-diff --git a/src/amd/Makefile.addrlib.am b/src/amd/Makefile.addrlib.am
-index 64823fc..4e2fb1d 100644
---- a/src/amd/Makefile.addrlib.am
-+++ b/src/amd/Makefile.addrlib.am
-@@ -28,6 +28,7 @@ addrlib_libamdgpu_addrlib_la_CPPFLAGS = \
-       -I$(srcdir)/addrlib/core \
-       -I$(srcdir)/addrlib/inc/chip/r800 \
-       -I$(srcdir)/addrlib/r800/chip \
-+      $(DEFINES) \
-       -DBRAHMA_BUILD=1
- addrlib_libamdgpu_addrlib_la_CXXFLAGS = \
-diff --git a/src/util/u_endian.h b/src/util/u_endian.h
-index b9d563d..266fb4a 100644
---- a/src/util/u_endian.h
-+++ b/src/util/u_endian.h
-@@ -27,7 +27,7 @@
- #ifndef U_ENDIAN_H
- #define U_ENDIAN_H
--#if defined(__GLIBC__) || defined(ANDROID)
-+#if defined(__GLIBC__) || defined(ANDROID) || defined(HAVE_ENDIAN_H)
- #include <endian.h>
- #if __BYTE_ORDER == __LITTLE_ENDIAN
--- 
-2.10.1
-
diff --git a/package/mesa3d/0003-configure.ac-invert-order-for-wayland-scanner-check.patch b/package/mesa3d/0003-configure.ac-invert-order-for-wayland-scanner-check.patch
new file mode 100644 (file)
index 0000000..d6c9a0d
--- /dev/null
@@ -0,0 +1,42 @@
+From 60ee5191a0c074251862a15b12afdc9db0b2df38 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Thu, 17 Nov 2016 15:36:54 -0300
+Subject: [PATCH] configure.ac: invert order for wayland-scanner check
+
+When cross-compiling the .pc file might point to the wrong
+wayland-scanner binary (target rather than host) resulting in a
+non-executable and wrong scanner.
+Try searching the PATH first, and if that fails fall back into
+pkg-config.
+
+[Vincent: tweak patch for 17.1.1 version]
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
+---
+ configure.ac | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2c7e636..0198d52 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2174,11 +2174,11 @@ if test "x$with_platforms" != xauto; then
+     with_egl_platforms=$with_platforms
+ fi
+-PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
+-        WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
+-        WAYLAND_SCANNER='')
++AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
+ if test "x$WAYLAND_SCANNER" = x; then
+-    AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
++      PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
++              WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
++              WAYLAND_SCANNER='')
+ fi
+ # Do per-EGL platform setups and checks
+-- 
+2.7.3
+
diff --git a/package/mesa3d/0004-configure.ac-invert-order-for-wayland-scanner-check.patch b/package/mesa3d/0004-configure.ac-invert-order-for-wayland-scanner-check.patch
deleted file mode 100644 (file)
index d6c9a0d..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-From 60ee5191a0c074251862a15b12afdc9db0b2df38 Mon Sep 17 00:00:00 2001
-From: Gustavo Zacarias <gustavo@zacarias.com.ar>
-Date: Thu, 17 Nov 2016 15:36:54 -0300
-Subject: [PATCH] configure.ac: invert order for wayland-scanner check
-
-When cross-compiling the .pc file might point to the wrong
-wayland-scanner binary (target rather than host) resulting in a
-non-executable and wrong scanner.
-Try searching the PATH first, and if that fails fall back into
-pkg-config.
-
-[Vincent: tweak patch for 17.1.1 version]
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
----
- configure.ac | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2c7e636..0198d52 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2174,11 +2174,11 @@ if test "x$with_platforms" != xauto; then
-     with_egl_platforms=$with_platforms
- fi
--PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
--        WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
--        WAYLAND_SCANNER='')
-+AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
- if test "x$WAYLAND_SCANNER" = x; then
--    AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
-+      PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
-+              WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
-+              WAYLAND_SCANNER='')
- fi
- # Do per-EGL platform setups and checks
--- 
-2.7.3
-