Fix building of shared gettext for i686/32-bit mingw32. This adds a
patch which fixes an issue with gnulib that is included in gettext.

This patch does not need to be submitted upstream as it is fixing an
issue with the included version of gnulib. Upstream gnulib has already
fixed this issue and upstream gettext has already updated the included
gnulib, however gettext has not yet made a release that includes this
fix.

Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
---
 .../fix-gl_cv_prog_as_underscore-test.patch        | 67 ++++++++++++++++++++++
 recipes-core/gettext/gettext_0.19.%.bbappend       |  7 ++-
 2 files changed, 73 insertions(+), 1 deletion(-)
 create mode 100644 
recipes-core/gettext/gettext/fix-gl_cv_prog_as_underscore-test.patch

diff --git 
a/recipes-core/gettext/gettext/fix-gl_cv_prog_as_underscore-test.patch 
b/recipes-core/gettext/gettext/fix-gl_cv_prog_as_underscore-test.patch
new file mode 100644
index 0000000000..636789f31d
--- /dev/null
+++ b/recipes-core/gettext/gettext/fix-gl_cv_prog_as_underscore-test.patch
@@ -0,0 +1,67 @@
+Backport gnulib fix for mingw into gettext's included version of gnulib
+
+http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=68b6adebef05670a312fb92b05e7bd089d2ed43a
+
+Upstream-Status: Backport
+Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
+
+--- a/gettext-runtime/gnulib-m4/asm-underscore.m4
++++ b/gettext-runtime/gnulib-m4/asm-underscore.m4
+@@ -27,11 +27,11 @@
+ #endif
+ int foo(void) { return 0; }
+ EOF
+      # Look for the assembly language name in the .s file.
+      AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) 
>/dev/null 2>&1
+-     if LC_ALL=C grep -E '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' 
conftest.$gl_asmext >/dev/null; then
++     if LC_ALL=C grep -E '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' 
conftest.$gl_asmext >/dev/null; then
+        gl_cv_prog_as_underscore=yes
+      else
+        gl_cv_prog_as_underscore=no
+      fi
+      rm -f conftest*
+--- a/gettext-runtime/configure
++++ b/gettext-runtime/configure
+@@ -24601,11 +24601,11 @@
+   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; } >/dev/null 2>&1
+-     if LC_ALL=C grep -E '(^|^a-zA-Z0-9_)_foo(^a-zA-Z0-9_|$)' 
conftest.$gl_asmext >/dev/null; then
++     if LC_ALL=C grep -E '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' 
conftest.$gl_asmext >/dev/null; then
+        gl_cv_prog_as_underscore=yes
+      else
+        gl_cv_prog_as_underscore=no
+      fi
+      rm -f conftest*
+--- a/gettext-tools/gnulib-m4/asm-underscore.m4
++++ b/gettext-tools/gnulib-m4/asm-underscore.m4
+@@ -27,11 +27,11 @@
+ #endif
+ int foo(void) { return 0; }
+ EOF
+      # Look for the assembly language name in the .s file.
+      AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) 
>/dev/null 2>&1
+-     if LC_ALL=C grep -E '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' 
conftest.$gl_asmext >/dev/null; then
++     if LC_ALL=C grep -E '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' 
conftest.$gl_asmext >/dev/null; then
+        gl_cv_prog_as_underscore=yes
+      else
+        gl_cv_prog_as_underscore=no
+      fi
+      rm -f conftest*
+--- a/gettext-tools/configure
++++ b/gettext-tools/configure
+@@ -32284,11 +32284,11 @@
+   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; } >/dev/null 2>&1
+-     if LC_ALL=C grep -E '(^|^a-zA-Z0-9_)_foo(^a-zA-Z0-9_|$)' 
conftest.$gl_asmext >/dev/null; then
++     if LC_ALL=C grep -E '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' 
conftest.$gl_asmext >/dev/null; then
+        gl_cv_prog_as_underscore=yes
+      else
+        gl_cv_prog_as_underscore=no
+      fi
+      rm -f conftest*
diff --git a/recipes-core/gettext/gettext_0.19.%.bbappend 
b/recipes-core/gettext/gettext_0.19.%.bbappend
index efd10d6bb6..1cf0188ea5 100644
--- a/recipes-core/gettext/gettext_0.19.%.bbappend
+++ b/recipes-core/gettext/gettext_0.19.%.bbappend
@@ -2,5 +2,10 @@ DEPENDS_append_mingw32 = " pthreads-win32"
 LDFLAGS_prepend_mingw32 = " -lpthread "
 
 CFLAGS_append_mingw32 = " -DLIBXML_STATIC"
-EXTRA_OECONF_append_mingw32 = " --enable-threads=windows --enable-static 
--disable-shared "
+EXTRA_OECONF_append_mingw32 = " --enable-threads=windows --enable-static"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+SRC_URI_append = " \
+               file://fix-gl_cv_prog_as_underscore-test.patch \
+               "
 
-- 
2.11.0

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to