|
@@ -0,0 +1,58 @@
|
|
|
+Fix runtime error with uClibc
|
|
|
+
|
|
|
+Patch sent upstream:
|
|
|
+http://lists.freedesktop.org/archives/mesa-dev/2015-March/079431.html
|
|
|
+
|
|
|
+
|
|
|
+From b1dae3cae9df36d9c4f64c342cfe7c106e34ec72 Mon Sep 17 00:00:00 2001
|
|
|
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
|
+Date: Sun, 15 Mar 2015 12:23:26 +0100
|
|
|
+Subject: [PATCH 1/1] 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
|
|
|
+
|
|
|
+Here is some background information about the fminf/fmaxf situation in uClibc:
|
|
|
+http://thread.gmane.org/gmane.comp.lib.uclibc.general/24189
|
|
|
+
|
|
|
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
|
+---
|
|
|
+ src/glsl/nir/nir_constant_expressions.py | 12 ++++++++++++
|
|
|
+ 1 file changed, 12 insertions(+)
|
|
|
+
|
|
|
+diff --git a/src/glsl/nir/nir_constant_expressions.py b/src/glsl/nir/nir_constant_expressions.py
|
|
|
+index 22bc4f0..139c25a 100644
|
|
|
+--- a/src/glsl/nir/nir_constant_expressions.py
|
|
|
++++ b/src/glsl/nir/nir_constant_expressions.py
|
|
|
+@@ -50,6 +50,18 @@ static double copysign(double x, double y)
|
|
|
+ }
|
|
|
+ #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.
|
|
|
+ */
|
|
|
+--
|
|
|
+1.7.10.4
|
|
|
+
|