package/uclibc: libm: Add missing C99 float/ld wrappers (backport)
PATCH 1/2 package/uclibc: libm: Add missing C99 float/ld wrappers (backport)
This commit adds a patch to uclibc with a backport from upstream to provide a proper fix for mesa3d which depends on fminf. Also remove the mesa3d patch which provided a crappy workaround.
--- .../0002-Fix-runtime-error-with-uClibc.patch | 58 -- .../0069-Add-missing-C99-float-ld-wrappers.patch | 870 ++++++++++++++++++++ 2 files changed, 870 insertions(+), 58 deletions(-) delete mode 100644 package/mesa3d/0002-Fix-runtime-error-with-uClibc.patch create mode 100644 package/uclibc/0.9.33.2/0069-Add-missing-C99-float-ld-wrappers.patch
package/mesa3d/0002-Fix-runtime-error-with-uClibc.patch deleted +0 -58
@@ -1,58 +0,0 @@ -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 <[email protected]> -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 <[email protected]> ---- - 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 -
package/uclibc/0.9.33.2/0069-Add-missing-C99-float-ld-wrappers.patch new file +870 -0
870 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 2/2 package/{mesa3d, mesa3d-headers}: bump version to 10.5.2
Add two patches to remove dependency on host-python.
0002-disable-python2.patch
is a patch fixing the remaining problems of patch #3
0003-configure.ac-error-out-if-python-mako-is-not-found-when-required.patch was ported from an upstream patch proposal to 10.5 branch
Fixes python3-related build error
http://autobuild.buildroot.net/results/1ce/1ce2509c8abb7483397c7d0f21c299095e94a254/
--- package/mesa3d-headers/mesa3d-headers.mk | 2 +- package/mesa3d/0002-disable-python2.patch | 29 ++++++++++ ...if-python-mako-is-not-found-when-required.patch | 61 ++++++++++++++++++++ package/mesa3d/mesa3d.hash | 4 +- package/mesa3d/mesa3d.mk | 3 +- 5 files changed, 94 insertions(+), 5 deletions(-) create mode 100644 package/mesa3d/0002-disable-python2.patch create mode 100644 package/mesa3d/0003-configure.ac-error-out-if-python-mako-is-not-found-when-required.patch
package/mesa3d-headers/mesa3d-headers.mk +1 -1
@@ -12,7 +12,7 @@ endif # Not possible to directly refer to mesa3d variables, because of # first/second expansion trickery... -MESA3D_HEADERS_VERSION = 10.5.1 +MESA3D_HEADERS_VERSION = 10.5.2 MESA3D_HEADERS_SOURCE = mesa-$(MESA3D_HEADERS_VERSION).tar.xz MESA3D_HEADERS_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_HEADERS_VERSION) MESA3D_HEADERS_LICENSE = MIT, SGI, Khronos
package/mesa3d/0002-disable-python2.patch new file +29 -0
@@ -0,0 +1,29 @@ +Upstream tarball provides all files generated by python, +this patch convinces the build system that host-python +is not needed anymore ;) + +Signed-off-by: Bernd Kuhls <[email protected]> + +diff -uNr mesa-10.5.2.org/configure.ac mesa-10.5.2/configure.ac +--- mesa-10.5.2.org/configure.ac 2015-03-28 19:20:39.000000000 +0100 ++++ mesa-10.5.2/configure.ac 2015-03-28 21:41:01.743499679 +0100 +@@ -87,7 +87,6 @@ + AM_PROG_CC_C_O + AM_PROG_AS + AX_CHECK_GNU_MAKE +-AC_CHECK_PROGS([PYTHON2], [python2 python]) + AC_PROG_SED + AC_PROG_MKDIR_P + +diff -uNr mesa-10.5.2.org/src/mesa/drivers/dri/common/xmlpool/Makefile.am mesa-10.5.2/src/mesa/drivers/dri/common/xmlpool/Makefile.am +--- mesa-10.5.2.org/src/mesa/drivers/dri/common/xmlpool/Makefile.am 2015-03-21 01:51:19.000000000 +0100 ++++ mesa-10.5.2/src/mesa/drivers/dri/common/xmlpool/Makefile.am 2015-03-28 22:01:54.279952601 +0100 +@@ -63,7 +63,7 @@ + + # Default target options.h + options.h: LOCALEDIR := . +-options.h: t_options.h $(MOS) ++options.h: t_options.h + $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/gen_xmlpool.py $(srcdir)/t_options.h $(LOCALEDIR) $(LANGS) > options.h + + # Update .mo files from the corresponding .po files.
package/mesa3d/0003-configure.ac-error-out-if-python-mako-is-not-found-when-required.patch new file +61 -0
61 lines not on this page · raw message
package/mesa3d/mesa3d.hash +2 -2
@@ -1,2 +1,2 @@ -# From http://lists.freedesktop.org/archives/mesa-announce/2015-March/000146.html -sha256 ffc51943d15c6812ee7611d053d8980a683fbd6a4986cff567b12cc66637d679 mesa-10.5.1.tar.xz +# From http://lists.freedesktop.org/archives/mesa-announce/2015-March/000148.html +sha256 2f4b6fb77c3e7d6f861558d0884a3073f575e1e673dad8d1b0624e78e9c4dd44 mesa-10.5.2.tar.xz
package/mesa3d/mesa3d.mk +1 -2
@@ -5,7 +5,7 @@ ################################################################################ # When updating the version, please also update mesa3d-headers -MESA3D_VERSION = 10.5.1 +MESA3D_VERSION = 10.5.2 MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION) MESA3D_LICENSE = MIT, SGI, Khronos
@@ -19,7 +19,6 @@ MESA3D_PROVIDES = MESA3D_DEPENDENCIES = \ expat \ host-gettext \ - host-python-mako \ libdrm ifeq ($(BR2_PACKAGE_XORG7),y)
Signature · 1 line
1.7.10.4
PATCH 1/2 package/uclibc: libm: Add missing C99 float/ld wrappers (backport)
In reply to Bernd KuhlsDear Bernd Kuhls,
Quoted 11 lines · Bernd Kuhls
This commit adds a patch to uclibc with a backport from upstream to provide a proper fix for mesa3d which depends on fminf. Also remove the mesa3d patch which provided a crappy workaround.
Signed-off-by Bernd Kuhls <[email protected]>--- .../0002-Fix-runtime-error-with-uClibc.patch | 58 -- .../0069-Add-missing-C99-float-ld-wrappers.patch | 870 ++++++++++++++++++++ 2 files changed, 870 insertions(+), 58 deletions(-) delete mode 100644 package/mesa3d/0002-Fix-runtime-error-with-uClibc.patch create mode 100644 package/uclibc/0.9.33.2/0069-Add-missing-C99-float-ld-wrappers.patch
I think we might need to keep the crappy workaround, or an improved version of it. The problem with doing a uClibc patch is that it will only work with internal uClibc toolchains: all uClibc toolchains will continue to be broken.
So we might want to do both:
1/ Fix uClibc properly, so that in the future (3-6 months from now), we can get rid of the mesa3d specific fix, after most of the external uClibc toolchains have been updated.
2/ Keep a mesa3d workaround for a little while.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 package/uclibc: libm: Add missing C99 float/ld wrappers (backport)
Bernd,
Could you get back to me about the below comments, ideally with a new iteration of the patches?
Thanks a lot!
Thomas
Quoted 29 lines · Thomas Petazzoni
Dear Bernd Kuhls,
Quoted 11 lines · Bernd Kuhls
This commit adds a patch to uclibc with a backport from upstream to provide a proper fix for mesa3d which depends on fminf. Also remove the mesa3d patch which provided a crappy workaround.
Signed-off-by Bernd Kuhls <[email protected]>--- .../0002-Fix-runtime-error-with-uClibc.patch | 58 -- .../0069-Add-missing-C99-float-ld-wrappers.patch | 870 ++++++++++++++++++++ 2 files changed, 870 insertions(+), 58 deletions(-) delete mode 100644 package/mesa3d/0002-Fix-runtime-error-with-uClibc.patch create mode 100644 package/uclibc/0.9.33.2/0069-Add-missing-C99-float-ld-wrappers.patchI think we might need to keep the crappy workaround, or an improved version of it. The problem with doing a uClibc patch is that it will only work with internal uClibc toolchains: all uClibc toolchains will continue to be broken.
So we might want to do both:
1/ Fix uClibc properly, so that in the future (3-6 months from now), we can get rid of the mesa3d specific fix, after most of the external uClibc toolchains have been updated.
2/ Keep a mesa3d workaround for a little while.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 package/uclibc: libm: Add missing C99 float/ld wrappers (backport)
Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20150407223635.04679618 at free-electrons.com:
Quoted 4 lines
Bernd,
Could you get back to me about the below comments, ideally with a new iteration of the patches?
Hi Thomas,
yes, will do so after run-time testing of new mesa3d 10.5.3.
Regards, Bernd