From: Romain Naour Date: Sat, 4 Nov 2017 16:01:25 +0000 (+0100) Subject: package/mesa3d: remove old patch for uClibc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3253c6fa4573307ec1631f3b34856b1daec9d1e1;p=buildroot.git package/mesa3d: remove old patch for uClibc 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 Cc: Bernd Kuhls Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- 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 index 59627beff6..0000000000 --- a/package/mesa3d/0001-Fix-runtime-error-with-uClibc.patch +++ /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 ---- -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 index 0000000000..8f7ba773aa --- /dev/null +++ b/package/mesa3d/0001-musl.patch @@ -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 + +--- ./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 + #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 index 0000000000..656705b434 --- /dev/null +++ b/package/mesa3d/0002-Fix-endianess-detection-with-musl-based-toolchains.patch @@ -0,0 +1,65 @@ +From 61b076689b6308b1c9d0d84ee8654a47e65e67ae Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +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 +--- + 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 + + #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 index 8f7ba773aa..0000000000 --- a/package/mesa3d/0002-musl.patch +++ /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 - ---- ./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 - #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 index 656705b434..0000000000 --- a/package/mesa3d/0003-Fix-endianess-detection-with-musl-based-toolchains.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 61b076689b6308b1c9d0d84ee8654a47e65e67ae Mon Sep 17 00:00:00 2001 -From: Bernd Kuhls -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 ---- - 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 - - #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 index 0000000000..d6c9a0d453 --- /dev/null +++ b/package/mesa3d/0003-configure.ac-invert-order-for-wayland-scanner-check.patch @@ -0,0 +1,42 @@ +From 60ee5191a0c074251862a15b12afdc9db0b2df38 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +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 +Signed-off-by: Vicente Olivert Riera +--- + 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 index d6c9a0d453..0000000000 --- a/package/mesa3d/0004-configure.ac-invert-order-for-wayland-scanner-check.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 60ee5191a0c074251862a15b12afdc9db0b2df38 Mon Sep 17 00:00:00 2001 -From: Gustavo Zacarias -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 -Signed-off-by: Vicente Olivert Riera ---- - 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 -