[oe] [PATCH] mesa: fix build error on uclibc

Petr Štetiar ynezz at true.cz
Fri Nov 26 10:46:29 UTC 2010


main/imports.c: In function '_mesa_strtof':
main/imports.c:804:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'loc'
main/imports.c:804:20: error: 'loc' undeclared (first use in this function)
main/imports.c:804:20: note: each undeclared identifier is reported only once for each function it appears in

Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 recipes/mesa/mesa-7.8.2.inc                     |    6 ++++++
 recipes/mesa/mesa-7.8.2/uclibc-locale-fix.patch |   13 +++++++++++++
 recipes/mesa/mesa_7.8.2.bb                      |    2 +-
 3 files changed, 20 insertions(+), 1 deletions(-)
 create mode 100644 recipes/mesa/mesa-7.8.2/uclibc-locale-fix.patch

diff --git a/recipes/mesa/mesa-7.8.2.inc b/recipes/mesa/mesa-7.8.2.inc
index 42d726c..d38b22d 100644
--- a/recipes/mesa/mesa-7.8.2.inc
+++ b/recipes/mesa/mesa-7.8.2.inc
@@ -4,6 +4,12 @@ SRC_URI += " \
             file://glamo.patch \
            "
 
+UCLIBC_PATCHES += " \
+	file://uclibc-locale-fix.patch \
+	"
+SRC_URI_append_linux-uclibc = ${UCLIBC_PATCHES}
+SRC_URI_append_linux-uclibceabi = ${UCLIBC_PATCHES}
+
 SRC_URI[archive.md5sum] = "6be2d343a0089bfd395ce02aaf8adb57"
 SRC_URI[archive.sha256sum] = "505bf418dceba05837f4ea1b1972b9620c35f8cb94bc4d1e6d573c15f562576d"
 SRC_URI[demos.md5sum] = "757d9e2e06f48b1a52848be9b0307ced"
diff --git a/recipes/mesa/mesa-7.8.2/uclibc-locale-fix.patch b/recipes/mesa/mesa-7.8.2/uclibc-locale-fix.patch
new file mode 100644
index 0000000..e05f927
--- /dev/null
+++ b/recipes/mesa/mesa-7.8.2/uclibc-locale-fix.patch
@@ -0,0 +1,13 @@
+Index: Mesa-7.8.2/src/mesa/main/imports.c
+===================================================================
+--- Mesa-7.8.2.orig/src/mesa/main/imports.c	2010-11-26 07:52:49.406879001 +0100
++++ Mesa-7.8.2/src/mesa/main/imports.c	2010-11-26 07:54:11.846879005 +0100
+@@ -800,7 +800,7 @@
+ float
+ _mesa_strtof( const char *s, char **end )
+ {
+-#ifdef _GNU_SOURCE
++#if defined(_GNU_SOURCE) && defined(__UCLIBC_HAS_LOCALE__)
+    static locale_t loc = NULL;
+    if (!loc) {
+       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
diff --git a/recipes/mesa/mesa_7.8.2.bb b/recipes/mesa/mesa_7.8.2.bb
index bbd0c41..48aa0ba 100644
--- a/recipes/mesa/mesa_7.8.2.bb
+++ b/recipes/mesa/mesa_7.8.2.bb
@@ -3,6 +3,6 @@ require mesa-dri_${PV}.bb
 
 FILESPATHPKG =. "mesa-dri-${PV}:"
 
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
 
 EXTRA_OECONF += "--disable-egl"
-- 
1.7.0.4





More information about the Openembedded-devel mailing list