public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Andreas Müller" <schnitzeltony@googlemail.com>
To: openembedded-core@lists.openembedded.org, raj.khem@gmail.com
Subject: [PATCH][V2 3/3] fix cross-localedef build with gettext-native in sysroot
Date: Wed,  3 Dec 2014 13:40:56 +0100	[thread overview]
Message-ID: <1417610456-788-3-git-send-email-schnitzeltony@googlemail.com> (raw)
In-Reply-To: <1417610456-788-1-git-send-email-schnitzeltony@googlemail.com>

with previous patch applied and gettext build before cross-localedef,
cross-localedef failed with.

/usr/bin/ld: cannot find -lintl

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 ...d-dragging-in-gettext-s-libintl.h-libintl.patch | 104 +++++++++++++++++++++
 .../glibc/cross-localedef-native_2.20.bb           |   1 +
 2 files changed, 105 insertions(+)
 create mode 100644 meta/recipes-core/glibc/cross-localedef-native/avoid-dragging-in-gettext-s-libintl.h-libintl.patch

diff --git a/meta/recipes-core/glibc/cross-localedef-native/avoid-dragging-in-gettext-s-libintl.h-libintl.patch b/meta/recipes-core/glibc/cross-localedef-native/avoid-dragging-in-gettext-s-libintl.h-libintl.patch
new file mode 100644
index 0000000..e19be03
--- /dev/null
+++ b/meta/recipes-core/glibc/cross-localedef-native/avoid-dragging-in-gettext-s-libintl.h-libintl.patch
@@ -0,0 +1,104 @@
+From d90df9d5f818df18ddccaf5405ffa65a63ea70a7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Wed, 3 Dec 2014 12:57:14 +0100
+Subject: [PATCH] avoid dragging in gettext's libintl.h / libintl
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+modify configure.ac and configure to make sure that we don't need to revisit in
+case autoconf is run in localedef subdirectory
+
+Upstream-Status: submitted [1]
+
+[1] https://github.com/kraj/localedef/pull/1
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ localedef/configure         | 45 ---------------------------------------------
+ localedef/configure.ac      |  1 -
+ include/libintl.h |  2 +-
+ 3 files changed, 1 insertion(+), 47 deletions(-)
+
+diff --git a/localedef/configure b/localedef/configure
+index 10f5f77..e4bb869 100755
+--- a/localedef/configure
++++ b/localedef/configure
+@@ -3893,51 +3893,6 @@ $as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
+ 
+ fi
+ 
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
+-$as_echo_n "checking for gettext in -lintl... " >&6; }
+-if ${ac_cv_lib_intl_gettext+:} false; then :
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lintl  $LIBS"
+-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char gettext ();
+-int
+-main ()
+-{
+-return gettext ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-if ac_fn_c_try_link "$LINENO"; then :
+-  ac_cv_lib_intl_gettext=yes
+-else
+-  ac_cv_lib_intl_gettext=no
+-fi
+-rm -f core conftest.err conftest.$ac_objext \
+-    conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
+-$as_echo "$ac_cv_lib_intl_gettext" >&6; }
+-if test "x$ac_cv_lib_intl_gettext" = xyes; then :
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBINTL 1
+-_ACEOF
+-
+-  LIBS="-lintl $LIBS"
+-
+-fi
+-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lposix4" >&5
+ $as_echo_n "checking for nanosleep in -lposix4... " >&6; }
+ if ${ac_cv_lib_posix4_nanosleep+:} false; then :
+diff --git a/configure.ac b/configure.ac
+index 33c8ff9..0004168 100644
+--- a/localedef/configure.ac
++++ b/localedef/configure.ac
+@@ -58,7 +58,6 @@ LOCAL_CHECK_FUNC([stpcpy], [#include <string.h>])
+ LOCAL_CHECK_FUNC([strsep], [#include <string.h>])
+ LOCAL_CHECK_VAR([program_invocation_name], [#include <errno.h>])
+ LOCAL_CHECK_VAR([program_invocation_short_name], [#include <errno.h>])
+-AC_CHECK_LIB([intl], [gettext])
+ AC_CHECK_LIB([posix4], [nanosleep])
+ 
+ # These two macros are taken from GCC's config/acx.m4.
+diff --git a/include/libintl.h b/include/libintl.h
+index 096aa8c..86143b6 100644
+--- a/localedef/include/libintl.h
++++ b/localedef/include/libintl.h
+@@ -1,5 +1,5 @@
+ #ifdef HAVE_LIBINTL_H
+-#include_next <libintl.h>
++#include "../intl/libintl.h"
+ #endif
+ 
+ #ifndef _
+-- 
+1.8.3.1
+
diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.20.bb b/meta/recipes-core/glibc/cross-localedef-native_2.20.bb
index ccf56a9..50a280b 100644
--- a/meta/recipes-core/glibc/cross-localedef-native_2.20.bb
+++ b/meta/recipes-core/glibc/cross-localedef-native_2.20.bb
@@ -19,6 +19,7 @@ PV = "2.20"
 SRC_URI = "git://sourceware.org/git/glibc.git;branch=release/${PV}/master;name=glibc \
            git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
 	   file://fix_for_centos_5.8.patch \
+           file://avoid-dragging-in-gettext-s-libintl.h-libintl.patch \
            ${EGLIBCPATCHES} \
           "
 EGLIBCPATCHES = "\
-- 
1.8.3.1



  parent reply	other threads:[~2014-12-03 12:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03 12:40 [PATCH][V2 1/3] pythonnative: set PYTHON_EXECUTABLE so that cmake can find it Andreas Müller
2014-12-03 12:40 ` [PATCH][V2 2/3] gettext-native: build libintl so that other native recipes can use them Andreas Müller
2014-12-15 10:30   ` Andreas Müller
2014-12-24 18:58   ` Saul Wold
2014-12-03 12:40 ` Andreas Müller [this message]
2014-12-15 10:31   ` [PATCH][V2 3/3] fix cross-localedef build with gettext-native in sysroot Andreas Müller
2014-12-15  9:12 ` [PATCH][V2 1/3] pythonnative: set PYTHON_EXECUTABLE so that cmake can find it Andreas Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417610456-788-3-git-send-email-schnitzeltony@googlemail.com \
    --to=schnitzeltony@googlemail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox