Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] bdwgc: add patch automatically detecting for NO_GETCONTEXT need
@ 2014-12-13 17:43 Samuel Martin
  2014-12-13 17:43 ` [Buildroot] [PATCH 2/3] package/guile: rename patch to new convention Samuel Martin
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Samuel Martin @ 2014-12-13 17:43 UTC (permalink / raw)
  To: buildroot

This patch is necessary to successfully build guile with toolchain
missing its support.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 ...ac-add-check-for-NO_GETCONTEXT-definition.patch | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch

diff --git a/package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch b/package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch
new file mode 100644
index 0000000..912a659
--- /dev/null
+++ b/package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch
@@ -0,0 +1,38 @@
+From e4448da044338f81548c13cb7eda2a49074156b3 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Mon, 8 Dec 2014 21:17:10 +0100
+Subject: [PATCH] configure.ac: add check for NO_GETCONTEXT definition
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ configure.ac | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 6551cbd..c3a0454 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -365,6 +365,20 @@ if test "$GCC" = yes; then
+   AC_MSG_RESULT($ac_cv_fno_strict_aliasing)
+ fi
+ 
++AC_MSG_CHECKING(for NO_GETCONTEXT need)
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++    #include <ucontext.h>
++  ]],[[
++    getcontext(0);
++  ]])],[need_no_getcontext=no],[need_no_getcontext=yes])
++AC_MSG_RESULT($need_no_getcontext)
++if test x$need_no_getcontext = xyes ; then
++  CFLAGS="$CFLAGS -DNO_GETCONTEXT"
++  CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"
++fi
++AC_MSG_NOTICE([[CFLAGS=$CFLAGS]])
++AC_MSG_NOTICE([[CPPFLAGS=$CPPFLAGS]])
++
+ case "$host" in
+ # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64
+ # and unnecessary everywhere.
+-- 
+2.1.3
+
-- 
2.1.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 2/3] package/guile: rename patch to new convention
  2014-12-13 17:43 [Buildroot] [PATCH 1/3] bdwgc: add patch automatically detecting for NO_GETCONTEXT need Samuel Martin
@ 2014-12-13 17:43 ` Samuel Martin
  2014-12-21 22:11   ` Thomas Petazzoni
  2014-12-13 17:43 ` [Buildroot] [PATCH 3/3] package/guile: fix build failure Samuel Martin
  2014-12-17 21:36 ` [Buildroot] [PATCH 1/3] bdwgc: add patch automatically detecting for NO_GETCONTEXT need Yann E. MORIN
  2 siblings, 1 reply; 9+ messages in thread
From: Samuel Martin @ 2014-12-13 17:43 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 .../{guile-01-fix_arm_endianness.patch => 0001-fix_arm_endianness.patch}  | 0
 ...calculate-csqrt_manually.patch => 0002-calculate-csqrt_manually.patch} | 0
 ...{guile-03-remove_unused_funcs.patch => 0003-remove_unused_funcs.patch} | 0
 3 files changed, 0 insertions(+), 0 deletions(-)
 rename package/guile/{guile-01-fix_arm_endianness.patch => 0001-fix_arm_endianness.patch} (100%)
 rename package/guile/{guile-02-calculate-csqrt_manually.patch => 0002-calculate-csqrt_manually.patch} (100%)
 rename package/guile/{guile-03-remove_unused_funcs.patch => 0003-remove_unused_funcs.patch} (100%)

diff --git a/package/guile/guile-01-fix_arm_endianness.patch b/package/guile/0001-fix_arm_endianness.patch
similarity index 100%
rename from package/guile/guile-01-fix_arm_endianness.patch
rename to package/guile/0001-fix_arm_endianness.patch
diff --git a/package/guile/guile-02-calculate-csqrt_manually.patch b/package/guile/0002-calculate-csqrt_manually.patch
similarity index 100%
rename from package/guile/guile-02-calculate-csqrt_manually.patch
rename to package/guile/0002-calculate-csqrt_manually.patch
diff --git a/package/guile/guile-03-remove_unused_funcs.patch b/package/guile/0003-remove_unused_funcs.patch
similarity index 100%
rename from package/guile/guile-03-remove_unused_funcs.patch
rename to package/guile/0003-remove_unused_funcs.patch
-- 
2.1.3

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 3/3] package/guile: fix build failure
  2014-12-13 17:43 [Buildroot] [PATCH 1/3] bdwgc: add patch automatically detecting for NO_GETCONTEXT need Samuel Martin
  2014-12-13 17:43 ` [Buildroot] [PATCH 2/3] package/guile: rename patch to new convention Samuel Martin
@ 2014-12-13 17:43 ` Samuel Martin
  2014-12-24 19:03   ` Yann E. MORIN
  2014-12-17 21:36 ` [Buildroot] [PATCH 1/3] bdwgc: add patch automatically detecting for NO_GETCONTEXT need Yann E. MORIN
  2 siblings, 1 reply; 9+ messages in thread
From: Samuel Martin @ 2014-12-13 17:43 UTC (permalink / raw)
  To: buildroot

These patches fix a number of dependency mis-detection (libltdl, libgmp
libunistring and locale support).

These patches are necessary to fix the build failures below, but also to
fix build failure with musl-based toolchains.

Fixes:
  http://autobuild.buildroot.org/results/f99/f99f2d5f29f282906c3c37b61dd56d6d71971bf7/
  http://autobuild.buildroot.org/results/bf7/bf716169aef4a6449991a62ada8de8e8fb107aba/
  http://autobuild.buildroot.org/results/565/565e5b613e125d4557bfcefd41d28644f3d6ab35/
  http://autobuild.buildroot.org/results/605/6053382dc78e6ddd588ba87be43b768c878293d5/
  http://autobuild.buildroot.org/results/e3c/e3c92c38c6b812d36ca12ffc8e7a0a4ccea34bc7/

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 ...e.ac-use-AC_LINK_IFELSE-for-libltdl-check.patch | 32 +++++++++
 ...re.ac-use-AC_LINK_IFELSE-for-libgmp-check.patch | 35 ++++++++++
 ...c-use-AC_LINK_IFELSE-for-libunistring-che.patch | 81 ++++++++++++++++++++++
 ...figure.ac-add-check-for-strtol_l-function.patch | 47 +++++++++++++
 package/guile/guile.mk                             |  3 +
 5 files changed, 198 insertions(+)
 create mode 100644 package/guile/0004-configure.ac-use-AC_LINK_IFELSE-for-libltdl-check.patch
 create mode 100644 package/guile/0005-configure.ac-use-AC_LINK_IFELSE-for-libgmp-check.patch
 create mode 100644 package/guile/0006-configure.ac-use-AC_LINK_IFELSE-for-libunistring-che.patch
 create mode 100644 package/guile/0007-configure.ac-add-check-for-strtol_l-function.patch

diff --git a/package/guile/0004-configure.ac-use-AC_LINK_IFELSE-for-libltdl-check.patch b/package/guile/0004-configure.ac-use-AC_LINK_IFELSE-for-libltdl-check.patch
new file mode 100644
index 0000000..53ac893
--- /dev/null
+++ b/package/guile/0004-configure.ac-use-AC_LINK_IFELSE-for-libltdl-check.patch
@@ -0,0 +1,32 @@
+From 86cf3d5cb164020918b0383e1a1105850f93fe70 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 7 Dec 2014 15:00:31 +0100
+Subject: [PATCH 4/7] configure.ac: use AC_LINK_IFELSE for libltdl check
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ configure.ac | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7e8b396..275fb75 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -94,8 +94,12 @@ AC_PROG_LIBTOOL
+ AM_CONDITIONAL([HAVE_SHARED_LIBRARIES], [test "x$enable_shared" = "xyes"])
+ 
+ dnl Check for libltdl.
+-AC_LIB_HAVE_LINKFLAGS([ltdl], [], [#include <ltdl.h>],
+-  [lt_dlopenext ("foo");])
++LIBLTDL="-lltdl"
++LIBS="$LIBLTDL $LIBS"
++AC_MSG_CHECKING([for the libltdl])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <ltdl.h>]],[[lt_dlopenext ("foo");]])],
++  [[LIBLTDL="-lltdl" ; HAVE_LIBLTDL=yes]], [[LIBLTDL= ; HAVE_LIBLTDL=no]])
++AC_MSG_RESULT($HAVE_LIBLTDL)
+ if test "x$HAVE_LIBLTDL" != "xyes"; then
+   AC_MSG_ERROR([GNU libltdl (Libtool) not found, see README.])
+ fi
+-- 
+2.1.3
+
diff --git a/package/guile/0005-configure.ac-use-AC_LINK_IFELSE-for-libgmp-check.patch b/package/guile/0005-configure.ac-use-AC_LINK_IFELSE-for-libgmp-check.patch
new file mode 100644
index 0000000..503411b
--- /dev/null
+++ b/package/guile/0005-configure.ac-use-AC_LINK_IFELSE-for-libgmp-check.patch
@@ -0,0 +1,35 @@
+From 0f26f1e18f7591aaaeee5562d856ba350bb1be61 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 7 Dec 2014 16:45:58 +0100
+Subject: [PATCH 5/7] configure.ac: use AC_LINK_IFELSE for libgmp check
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ configure.ac | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 275fb75..4c4f4fd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -877,11 +877,12 @@ fi
+ AC_CACHE_SAVE
+ 
+ dnl GMP tests
+-AC_LIB_HAVE_LINKFLAGS([gmp],
+-  [],
+-  [#include <gmp.h>],
+-  [mpz_import (0, 0, 0, 0, 0, 0, 0);])
+-
++LIBGMP="-lgmp"
++LIBS="$LIBGMP $LIBS"
++AC_MSG_CHECKING([for the libgmp])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gmp.h>]],[[mpz_import (0, 0, 0, 0, 0, 0, 0);]])],
++  [[LIBGMP="-lgmp" ; HAVE_LIBGMP=yes]], [[LIBGMP= ; HAVE_LIBGMP=no]])
++AC_MSG_RESULT($HAVE_LIBGMP)
+ if test "x$HAVE_LIBGMP" != "xyes"; then
+   AC_MSG_ERROR([GNU MP 4.1 or greater not found, see README])
+ fi
+-- 
+2.1.3
+
diff --git a/package/guile/0006-configure.ac-use-AC_LINK_IFELSE-for-libunistring-che.patch b/package/guile/0006-configure.ac-use-AC_LINK_IFELSE-for-libunistring-che.patch
new file mode 100644
index 0000000..a899462
--- /dev/null
+++ b/package/guile/0006-configure.ac-use-AC_LINK_IFELSE-for-libunistring-che.patch
@@ -0,0 +1,81 @@
+From 73222acb19916044611add0abbe470a11180a9eb Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 7 Dec 2014 17:14:47 +0100
+Subject: [PATCH 6/7] configure.ac: use AC_LINK_IFELSE for libunistring checks
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ configure.ac       |  7 +++++++
+ m4/libunistring.m4 | 24 +++++++++++++++---------
+ 2 files changed, 22 insertions(+), 9 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4c4f4fd..7af9c7b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -896,6 +896,13 @@ AC_CHECK_DECLS([mpz_inits], [], [], [[#include <gmp.h>]])
+ CPPFLAGS="$save_CPPFLAGS"
+ 
+ dnl GNU libunistring is checked for by Gnulib's `libunistring' module.
++LIBUNISTRING="-lunistring"
++LIBS="$LIBUNISTRING $LIBS"
++AC_MSG_CHECKING([for the libunistring])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <uniconv.h>]],[[u8_strconv_from_locale((char*)0);]])],
++  [[LIBUNISTRING="-lunistring" ; LTLIBUNISTRING="-lunistring" ; HAVE_LIBUNISTRING=yes]],
++  [[LIBUNISTRING= ; HAVE_LIBUNISTRING=no]])
++AC_MSG_RESULT($HAVE_LIBUNISTRING)
+ if test "x$LTLIBUNISTRING" = "x"; then
+   AC_MSG_ERROR([GNU libunistring is required, please install it.])
+ fi
+diff --git a/m4/libunistring.m4 b/m4/libunistring.m4
+index 35980dd..864a32f 100644
+--- a/m4/libunistring.m4
++++ b/m4/libunistring.m4
+@@ -72,9 +72,14 @@ AC_DEFUN([gl_LIBUNISTRING_CORE],
+     dnl First, try to link without -liconv. libunistring often depends on
+     dnl libiconv, but we don't know (and often don't need to know) where
+     dnl libiconv is installed.
+-    AC_LIB_HAVE_LINKFLAGS([unistring], [],
+-      [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);],
+-      [no, trying again together with libiconv])
++
++    LIBUNISTRING="-lunistring"
++    LIBS="$LIBUNISTRING $LIBS"
++    AC_MSG_CHECKING([for the libunistring])
++    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <uniconv.h>]],[[u8_strconv_from_locale((char*)0);]])],
++      [[LIBUNISTRING="-lunistring" ; LTLIBUNISTRING="-lunistring" ; HAVE_LIBUNISTRING=yes ; ac_cv_libunistring=yes]],
++      [[LIBUNISTRING= ; HAVE_LIBUNISTRING=no ; ac_cv_libunistring=no]])
++
+     if test "$ac_cv_libunistring" != yes; then
+       dnl Second try, with -liconv.
+       dnl We have to erase the cached result of the first AC_LIB_HAVE_LINKFLAGS
+@@ -82,9 +87,10 @@ AC_DEFUN([gl_LIBUNISTRING_CORE],
+       unset ac_cv_libunistring
+       glus_save_LIBS="$LIBS"
+       LIBS="$LIBS $LIBICONV"
+-      AC_LIB_HAVE_LINKFLAGS([unistring], [],
+-        [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);],
+-        [no, consider installing GNU libunistring])
++      AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <uniconv.h>]],[[u8_strconv_from_locale((char*)0);]])],
++        [[LIBUNISTRING="-lunistring" ; LTLIBUNISTRING="-lunistring" ; HAVE_LIBUNISTRING=yes]],
++        [[LIBUNISTRING= ; HAVE_LIBUNISTRING=no]])
++
+       if test -n "$LIBUNISTRING"; then
+         LIBUNISTRING="$LIBUNISTRING $LIBICONV"
+         LTLIBUNISTRING="$LTLIBUNISTRING $LTLIBICONV"
+@@ -92,9 +98,9 @@ AC_DEFUN([gl_LIBUNISTRING_CORE],
+       LIBS="$glus_save_LIBS"
+     fi
+   else
+-    AC_LIB_HAVE_LINKFLAGS([unistring], [],
+-      [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);],
+-      [no, consider installing GNU libunistring])
++    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <uniconv.h>]],[[u8_strconv_from_locale((char*)0);]])],
++      [[LIBUNISTRING="-lunistring" ; LTLIBUNISTRING="-lunistring" ; HAVE_LIBUNISTRING=yes]],
++      [[LIBUNISTRING= ; HAVE_LIBUNISTRING=no]])
+   fi
+   if test $HAVE_LIBUNISTRING = yes; then
+     dnl Determine the installed version.
+-- 
+2.1.3
+
diff --git a/package/guile/0007-configure.ac-add-check-for-strtol_l-function.patch b/package/guile/0007-configure.ac-add-check-for-strtol_l-function.patch
new file mode 100644
index 0000000..fb6a116
--- /dev/null
+++ b/package/guile/0007-configure.ac-add-check-for-strtol_l-function.patch
@@ -0,0 +1,47 @@
+From 93e1a2b8eef99181ddf620414ae675e895f3a048 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Wed, 10 Dec 2014 08:28:17 +0100
+Subject: [PATCH 7/7] configure.ac: add check for strtol_l function
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ configure.ac    | 9 +++++++++
+ libguile/i18n.c | 2 +-
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7af9c7b..92abc84 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -895,6 +895,15 @@ fi
+ AC_CHECK_DECLS([mpz_inits], [], [], [[#include <gmp.h>]])
+ CPPFLAGS="$save_CPPFLAGS"
+ 
++dnl strtol_l (locale) tests
++AC_MSG_CHECKING([for strtol_l])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]],[[strtol_l (0, 0, 0, 0);]])],
++  [[HAVE_STRTOL_L=yes]], [[HAVE_STRTOL_L=no]])
++AC_MSG_RESULT($HAVE_STRTOL_L)
++if test "x$HAVE_STRTOL_L" = "xyes"; then
++  AC_DEFINE([HAVE_STRTOL_L], 1, [Define to 1 if strtol_l is defined])
++fi
++
+ dnl GNU libunistring is checked for by Gnulib's `libunistring' module.
+ LIBUNISTRING="-lunistring"
+ LIBS="$LIBUNISTRING $LIBS"
+diff --git a/libguile/i18n.c b/libguile/i18n.c
+index 395e528..2bb4812 100644
+--- a/libguile/i18n.c
++++ b/libguile/i18n.c
+@@ -40,7 +40,7 @@
+ #include <unicase.h>
+ #include <unistr.h>
+ 
+-#if (defined HAVE_NEWLOCALE) && (defined HAVE_STRCOLL_L)
++#if (defined HAVE_NEWLOCALE) && (defined HAVE_STRCOLL_L) && defined(HAVE_STRTOL_L)
+ /* The GNU thread-aware locale API is documented in ``Thread-Aware Locale
+    Model, a Proposal'', by Ulrich Drepper:
+ 
+-- 
+2.1.3
+
diff --git a/package/guile/guile.mk b/package/guile/guile.mk
index 30af11d..238e39a 100644
--- a/package/guile/guile.mk
+++ b/package/guile/guile.mk
@@ -11,6 +11,9 @@ GUILE_INSTALL_STAGING = YES
 GUILE_LICENSE = LGPLv3+
 GUILE_LICENSE_FILES = LICENSE COPYING COPYING.LESSER
 
+# autoreconf if needed because we are patching configure.ac and some *.m4 files
+GUILE_AUTORECONF = YES
+
 # libtool dependency is needed because guile uses libltdl
 GUILE_DEPENDENCIES = host-guile libunistring libffi gmp bdwgc host-pkgconf libtool
 HOST_GUILE_DEPENDENCIES = host-libunistring host-libffi host-gmp host-bdwgc host-flex host-pkgconf host-gettext
-- 
2.1.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/3] bdwgc: add patch automatically detecting for NO_GETCONTEXT need
  2014-12-13 17:43 [Buildroot] [PATCH 1/3] bdwgc: add patch automatically detecting for NO_GETCONTEXT need Samuel Martin
  2014-12-13 17:43 ` [Buildroot] [PATCH 2/3] package/guile: rename patch to new convention Samuel Martin
  2014-12-13 17:43 ` [Buildroot] [PATCH 3/3] package/guile: fix build failure Samuel Martin
@ 2014-12-17 21:36 ` Yann E. MORIN
  2014-12-21 22:17   ` Thomas Petazzoni
  2 siblings, 1 reply; 9+ messages in thread
From: Yann E. MORIN @ 2014-12-17 21:36 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-12-13 18:43 +0100, Samuel Martin spake thusly:
> This patch is necessary to successfully build guile with toolchain
> missing its support.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  ...ac-add-check-for-NO_GETCONTEXT-definition.patch | 38 ++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
>  create mode 100644 package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch
> 
> diff --git a/package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch b/package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch
> new file mode 100644
> index 0000000..912a659
> --- /dev/null
> +++ b/package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch
> @@ -0,0 +1,38 @@
> +From e4448da044338f81548c13cb7eda2a49074156b3 Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +Date: Mon, 8 Dec 2014 21:17:10 +0100
> +Subject: [PATCH] configure.ac: add check for NO_GETCONTEXT definition
> +
> +Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> +---
> + configure.ac | 14 ++++++++++++++
> + 1 file changed, 14 insertions(+)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 6551cbd..c3a0454 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -365,6 +365,20 @@ if test "$GCC" = yes; then
> +   AC_MSG_RESULT($ac_cv_fno_strict_aliasing)
> + fi
> + 
> ++AC_MSG_CHECKING(for NO_GETCONTEXT need)
> ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
> ++    #include <ucontext.h>
> ++  ]],[[
> ++    getcontext(0);
> ++  ]])],[need_no_getcontext=no],[need_no_getcontext=yes])

The naming of the need_no_getcontext is relatively non obvious. Usually,
tests are used to check if the toolchain/system has a feature, so it
would be more appropriate to name that variable has_getcontext,
regardless of what action it will entail.

In proper English, you'd write:

  If the toolchain does not have getcontext, then I disable use of it.

==> has_getcontext    ;-)

Otherwise, I tried to find how others were checking for getcontext, and
it is very difficult o find a package that does.

The first I could find was GNU Pth (dead since 2006), and then ruby. And
they both use that:

    AC_CHECK_FUNCS([getcontext setcontext])

which would automatically define HAVE_getcontext and HAVE_setcontext if
they are available, but that's macro definitions, not available in
configure, so we could not do the following:

> ++AC_MSG_RESULT($need_no_getcontext)
> ++if test x$need_no_getcontext = xyes ; then
> ++  CFLAGS="$CFLAGS -DNO_GETCONTEXT"
> ++  CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"
> ++fi
> ++AC_MSG_NOTICE([[CFLAGS=$CFLAGS]])
> ++AC_MSG_NOTICE([[CPPFLAGS=$CPPFLAGS]])

No need for those two notices.

I'm unsure what to do with that... Sure, it's not too complex, but what
would upstream say about that? Surely, we'd like to push it to them so
we do not have to maintain it...

Regards,
Yann E. MORIN.

> + case "$host" in
> + # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64
> + # and unnecessary everywhere.
> +-- 
> +2.1.3
> +
> -- 
> 2.1.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 2/3] package/guile: rename patch to new convention
  2014-12-13 17:43 ` [Buildroot] [PATCH 2/3] package/guile: rename patch to new convention Samuel Martin
@ 2014-12-21 22:11   ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2014-12-21 22:11 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Sat, 13 Dec 2014 18:43:07 +0100, Samuel Martin wrote:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  .../{guile-01-fix_arm_endianness.patch => 0001-fix_arm_endianness.patch}  | 0
>  ...calculate-csqrt_manually.patch => 0002-calculate-csqrt_manually.patch} | 0
>  ...{guile-03-remove_unused_funcs.patch => 0003-remove_unused_funcs.patch} | 0
>  3 files changed, 0 insertions(+), 0 deletions(-)
>  rename package/guile/{guile-01-fix_arm_endianness.patch => 0001-fix_arm_endianness.patch} (100%)
>  rename package/guile/{guile-02-calculate-csqrt_manually.patch => 0002-calculate-csqrt_manually.patch} (100%)
>  rename package/guile/{guile-03-remove_unused_funcs.patch => 0003-remove_unused_funcs.patch} (100%)

Applied, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/3] bdwgc: add patch automatically detecting for NO_GETCONTEXT need
  2014-12-17 21:36 ` [Buildroot] [PATCH 1/3] bdwgc: add patch automatically detecting for NO_GETCONTEXT need Yann E. MORIN
@ 2014-12-21 22:17   ` Thomas Petazzoni
  2014-12-23 13:02     ` Yann E. MORIN
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2014-12-21 22:17 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Wed, 17 Dec 2014 22:36:02 +0100, Yann E. MORIN wrote:

> The first I could find was GNU Pth (dead since 2006), and then ruby. And
> they both use that:
> 
>     AC_CHECK_FUNCS([getcontext setcontext])
> 
> which would automatically define HAVE_getcontext and HAVE_setcontext if
> they are available, but that's macro definitions, not available in
> configure, so we could not do the following:
> 
> > ++AC_MSG_RESULT($need_no_getcontext)
> > ++if test x$need_no_getcontext = xyes ; then
> > ++  CFLAGS="$CFLAGS -DNO_GETCONTEXT"
> > ++  CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"
> > ++fi

Well, you can do:

	AC_CHECK_FUNCS([getcontext], [has_getcontext=yes])
	AC_CHECK_FUNCS([setcontext], [has_setcontext=yes])

if test x${has_getcontext} != xyes -o x${has_setcontext} != xyes; then
	CFLAGS="$CFLAGS -DNO_GETCONTEXT"
	CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"
fi

You need two tests because AC_CHECK_FUNCS() runs the action-if-found if
at least one of the functions are found.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/3] bdwgc: add patch automatically detecting for NO_GETCONTEXT need
  2014-12-21 22:17   ` Thomas Petazzoni
@ 2014-12-23 13:02     ` Yann E. MORIN
  2014-12-23 22:18       ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Yann E. MORIN @ 2014-12-23 13:02 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2014-12-21 23:17 +0100, Thomas Petazzoni spake thusly:
> On Wed, 17 Dec 2014 22:36:02 +0100, Yann E. MORIN wrote:
> 
> > The first I could find was GNU Pth (dead since 2006), and then ruby. And
> > they both use that:
> > 
> >     AC_CHECK_FUNCS([getcontext setcontext])
> > 
> > which would automatically define HAVE_getcontext and HAVE_setcontext if
> > they are available, but that's macro definitions, not available in
> > configure, so we could not do the following:
> > 
> > > ++AC_MSG_RESULT($need_no_getcontext)
> > > ++if test x$need_no_getcontext = xyes ; then
> > > ++  CFLAGS="$CFLAGS -DNO_GETCONTEXT"
> > > ++  CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"
> > > ++fi
> 
> Well, you can do:
> 
> 	AC_CHECK_FUNCS([getcontext], [has_getcontext=yes])
> 	AC_CHECK_FUNCS([setcontext], [has_setcontext=yes])

Using AC_CHECK_FUNCS is not enough, because uClibc declares prototypes
for getcontext/setcontext, but there might be no implementation of them.

So we have to attempt a link.

> if test x${has_getcontext} != xyes -o x${has_setcontext} != xyes; then
> 	CFLAGS="$CFLAGS -DNO_GETCONTEXT"
> 	CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"
> fi
> 
> You need two tests because AC_CHECK_FUNCS() runs the action-if-found if
> at least one of the functions are found.

Yup.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/3] bdwgc: add patch automatically detecting for NO_GETCONTEXT need
  2014-12-23 13:02     ` Yann E. MORIN
@ 2014-12-23 22:18       ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2014-12-23 22:18 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Tue, 23 Dec 2014 14:02:00 +0100, Yann E. MORIN wrote:

> > Well, you can do:
> > 
> > 	AC_CHECK_FUNCS([getcontext], [has_getcontext=yes])
> > 	AC_CHECK_FUNCS([setcontext], [has_setcontext=yes])
> 
> Using AC_CHECK_FUNCS is not enough, because uClibc declares prototypes
> for getcontext/setcontext, but there might be no implementation of them.
> 
> So we have to attempt a link.

AC_CHECK_FUNCS is doing a link, at least that's what a quick test
shows. Try the following minimal configure.ac:

AC_INIT(foobar, 1.0, me at mail.com)
AC_PROG_CXX
AC_CHECK_FUNCS([setcontext])

Try with your host system, which presumably uses glibc and therefore
has setcontext():

$ ./configure
[...]
checking for setcontext... yes
[...]

And the config.log contains:

[...]
configure:2934: checking for setcontext
configure:2934: gcc -o conftest -g -O2   conftest.c  >&5
configure:2934: $? = 0
configure:2934: result: yes
[...]

See how the command line is a full link of the conftest program?

Now, try again with a Buildroot uClibc toolchain:

$ PATH=/home/thomas/projets/buildroot/output/host/usr/bin/:$PATH ./configure --host=arm-linux
[...]
checking for setcontext... no
[...]

And the config.log contains:

[...]
configure:2934: arm-linux-gcc -o conftest -g -O2   conftest.c  >&5
/tmp/cceDeuVd.o: In function `main':
/tmp/foo/conftest.c:43: undefined reference to `setcontext'
collect2: error: ld returned 1 exit status
configure:2934: $? = 1
[...]

So I believe an AC_CHECK_FUNCS() test is enough here.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 3/3] package/guile: fix build failure
  2014-12-13 17:43 ` [Buildroot] [PATCH 3/3] package/guile: fix build failure Samuel Martin
@ 2014-12-24 19:03   ` Yann E. MORIN
  0 siblings, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2014-12-24 19:03 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-12-13 18:43 +0100, Samuel Martin spake thusly:
> These patches fix a number of dependency mis-detection (libltdl, libgmp
> libunistring and locale support).
> 
> These patches are necessary to fix the build failures below, but also to
> fix build failure with musl-based toolchains.
> 
> Fixes:
>   http://autobuild.buildroot.org/results/f99/f99f2d5f29f282906c3c37b61dd56d6d71971bf7/
>   http://autobuild.buildroot.org/results/bf7/bf716169aef4a6449991a62ada8de8e8fb107aba/
>   http://autobuild.buildroot.org/results/565/565e5b613e125d4557bfcefd41d28644f3d6ab35/
>   http://autobuild.buildroot.org/results/605/6053382dc78e6ddd588ba87be43b768c878293d5/
>   http://autobuild.buildroot.org/results/e3c/e3c92c38c6b812d36ca12ffc8e7a0a4ccea34bc7/

I was unable to reproduce all those build failures without your patches.

So, I'll respin onlt the bdwgc patch, and drop that one (which I am also
marking Rejected in patchwork), until we have a better understanding
about what is going on (probably after the holiday period?).

Regards,
Yann E. MORIN.

> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  ...e.ac-use-AC_LINK_IFELSE-for-libltdl-check.patch | 32 +++++++++
>  ...re.ac-use-AC_LINK_IFELSE-for-libgmp-check.patch | 35 ++++++++++
>  ...c-use-AC_LINK_IFELSE-for-libunistring-che.patch | 81 ++++++++++++++++++++++
>  ...figure.ac-add-check-for-strtol_l-function.patch | 47 +++++++++++++
>  package/guile/guile.mk                             |  3 +
>  5 files changed, 198 insertions(+)
>  create mode 100644 package/guile/0004-configure.ac-use-AC_LINK_IFELSE-for-libltdl-check.patch
>  create mode 100644 package/guile/0005-configure.ac-use-AC_LINK_IFELSE-for-libgmp-check.patch
>  create mode 100644 package/guile/0006-configure.ac-use-AC_LINK_IFELSE-for-libunistring-che.patch
>  create mode 100644 package/guile/0007-configure.ac-add-check-for-strtol_l-function.patch
> 
> diff --git a/package/guile/0004-configure.ac-use-AC_LINK_IFELSE-for-libltdl-check.patch b/package/guile/0004-configure.ac-use-AC_LINK_IFELSE-for-libltdl-check.patch
> new file mode 100644
> index 0000000..53ac893
> --- /dev/null
> +++ b/package/guile/0004-configure.ac-use-AC_LINK_IFELSE-for-libltdl-check.patch
> @@ -0,0 +1,32 @@
> +From 86cf3d5cb164020918b0383e1a1105850f93fe70 Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +Date: Sun, 7 Dec 2014 15:00:31 +0100
> +Subject: [PATCH 4/7] configure.ac: use AC_LINK_IFELSE for libltdl check
> +
> +Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> +---
> + configure.ac | 8 ++++++--
> + 1 file changed, 6 insertions(+), 2 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 7e8b396..275fb75 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -94,8 +94,12 @@ AC_PROG_LIBTOOL
> + AM_CONDITIONAL([HAVE_SHARED_LIBRARIES], [test "x$enable_shared" = "xyes"])
> + 
> + dnl Check for libltdl.
> +-AC_LIB_HAVE_LINKFLAGS([ltdl], [], [#include <ltdl.h>],
> +-  [lt_dlopenext ("foo");])
> ++LIBLTDL="-lltdl"
> ++LIBS="$LIBLTDL $LIBS"
> ++AC_MSG_CHECKING([for the libltdl])
> ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <ltdl.h>]],[[lt_dlopenext ("foo");]])],
> ++  [[LIBLTDL="-lltdl" ; HAVE_LIBLTDL=yes]], [[LIBLTDL= ; HAVE_LIBLTDL=no]])
> ++AC_MSG_RESULT($HAVE_LIBLTDL)
> + if test "x$HAVE_LIBLTDL" != "xyes"; then
> +   AC_MSG_ERROR([GNU libltdl (Libtool) not found, see README.])
> + fi
> +-- 
> +2.1.3
> +
> diff --git a/package/guile/0005-configure.ac-use-AC_LINK_IFELSE-for-libgmp-check.patch b/package/guile/0005-configure.ac-use-AC_LINK_IFELSE-for-libgmp-check.patch
> new file mode 100644
> index 0000000..503411b
> --- /dev/null
> +++ b/package/guile/0005-configure.ac-use-AC_LINK_IFELSE-for-libgmp-check.patch
> @@ -0,0 +1,35 @@
> +From 0f26f1e18f7591aaaeee5562d856ba350bb1be61 Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +Date: Sun, 7 Dec 2014 16:45:58 +0100
> +Subject: [PATCH 5/7] configure.ac: use AC_LINK_IFELSE for libgmp check
> +
> +Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> +---
> + configure.ac | 11 ++++++-----
> + 1 file changed, 6 insertions(+), 5 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 275fb75..4c4f4fd 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -877,11 +877,12 @@ fi
> + AC_CACHE_SAVE
> + 
> + dnl GMP tests
> +-AC_LIB_HAVE_LINKFLAGS([gmp],
> +-  [],
> +-  [#include <gmp.h>],
> +-  [mpz_import (0, 0, 0, 0, 0, 0, 0);])
> +-
> ++LIBGMP="-lgmp"
> ++LIBS="$LIBGMP $LIBS"
> ++AC_MSG_CHECKING([for the libgmp])
> ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gmp.h>]],[[mpz_import (0, 0, 0, 0, 0, 0, 0);]])],
> ++  [[LIBGMP="-lgmp" ; HAVE_LIBGMP=yes]], [[LIBGMP= ; HAVE_LIBGMP=no]])
> ++AC_MSG_RESULT($HAVE_LIBGMP)
> + if test "x$HAVE_LIBGMP" != "xyes"; then
> +   AC_MSG_ERROR([GNU MP 4.1 or greater not found, see README])
> + fi
> +-- 
> +2.1.3
> +
> diff --git a/package/guile/0006-configure.ac-use-AC_LINK_IFELSE-for-libunistring-che.patch b/package/guile/0006-configure.ac-use-AC_LINK_IFELSE-for-libunistring-che.patch
> new file mode 100644
> index 0000000..a899462
> --- /dev/null
> +++ b/package/guile/0006-configure.ac-use-AC_LINK_IFELSE-for-libunistring-che.patch
> @@ -0,0 +1,81 @@
> +From 73222acb19916044611add0abbe470a11180a9eb Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +Date: Sun, 7 Dec 2014 17:14:47 +0100
> +Subject: [PATCH 6/7] configure.ac: use AC_LINK_IFELSE for libunistring checks
> +
> +Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> +---
> + configure.ac       |  7 +++++++
> + m4/libunistring.m4 | 24 +++++++++++++++---------
> + 2 files changed, 22 insertions(+), 9 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 4c4f4fd..7af9c7b 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -896,6 +896,13 @@ AC_CHECK_DECLS([mpz_inits], [], [], [[#include <gmp.h>]])
> + CPPFLAGS="$save_CPPFLAGS"
> + 
> + dnl GNU libunistring is checked for by Gnulib's `libunistring' module.
> ++LIBUNISTRING="-lunistring"
> ++LIBS="$LIBUNISTRING $LIBS"
> ++AC_MSG_CHECKING([for the libunistring])
> ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <uniconv.h>]],[[u8_strconv_from_locale((char*)0);]])],
> ++  [[LIBUNISTRING="-lunistring" ; LTLIBUNISTRING="-lunistring" ; HAVE_LIBUNISTRING=yes]],
> ++  [[LIBUNISTRING= ; HAVE_LIBUNISTRING=no]])
> ++AC_MSG_RESULT($HAVE_LIBUNISTRING)
> + if test "x$LTLIBUNISTRING" = "x"; then
> +   AC_MSG_ERROR([GNU libunistring is required, please install it.])
> + fi
> +diff --git a/m4/libunistring.m4 b/m4/libunistring.m4
> +index 35980dd..864a32f 100644
> +--- a/m4/libunistring.m4
> ++++ b/m4/libunistring.m4
> +@@ -72,9 +72,14 @@ AC_DEFUN([gl_LIBUNISTRING_CORE],
> +     dnl First, try to link without -liconv. libunistring often depends on
> +     dnl libiconv, but we don't know (and often don't need to know) where
> +     dnl libiconv is installed.
> +-    AC_LIB_HAVE_LINKFLAGS([unistring], [],
> +-      [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);],
> +-      [no, trying again together with libiconv])
> ++
> ++    LIBUNISTRING="-lunistring"
> ++    LIBS="$LIBUNISTRING $LIBS"
> ++    AC_MSG_CHECKING([for the libunistring])
> ++    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <uniconv.h>]],[[u8_strconv_from_locale((char*)0);]])],
> ++      [[LIBUNISTRING="-lunistring" ; LTLIBUNISTRING="-lunistring" ; HAVE_LIBUNISTRING=yes ; ac_cv_libunistring=yes]],
> ++      [[LIBUNISTRING= ; HAVE_LIBUNISTRING=no ; ac_cv_libunistring=no]])
> ++
> +     if test "$ac_cv_libunistring" != yes; then
> +       dnl Second try, with -liconv.
> +       dnl We have to erase the cached result of the first AC_LIB_HAVE_LINKFLAGS
> +@@ -82,9 +87,10 @@ AC_DEFUN([gl_LIBUNISTRING_CORE],
> +       unset ac_cv_libunistring
> +       glus_save_LIBS="$LIBS"
> +       LIBS="$LIBS $LIBICONV"
> +-      AC_LIB_HAVE_LINKFLAGS([unistring], [],
> +-        [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);],
> +-        [no, consider installing GNU libunistring])
> ++      AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <uniconv.h>]],[[u8_strconv_from_locale((char*)0);]])],
> ++        [[LIBUNISTRING="-lunistring" ; LTLIBUNISTRING="-lunistring" ; HAVE_LIBUNISTRING=yes]],
> ++        [[LIBUNISTRING= ; HAVE_LIBUNISTRING=no]])
> ++
> +       if test -n "$LIBUNISTRING"; then
> +         LIBUNISTRING="$LIBUNISTRING $LIBICONV"
> +         LTLIBUNISTRING="$LTLIBUNISTRING $LTLIBICONV"
> +@@ -92,9 +98,9 @@ AC_DEFUN([gl_LIBUNISTRING_CORE],
> +       LIBS="$glus_save_LIBS"
> +     fi
> +   else
> +-    AC_LIB_HAVE_LINKFLAGS([unistring], [],
> +-      [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);],
> +-      [no, consider installing GNU libunistring])
> ++    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <uniconv.h>]],[[u8_strconv_from_locale((char*)0);]])],
> ++      [[LIBUNISTRING="-lunistring" ; LTLIBUNISTRING="-lunistring" ; HAVE_LIBUNISTRING=yes]],
> ++      [[LIBUNISTRING= ; HAVE_LIBUNISTRING=no]])
> +   fi
> +   if test $HAVE_LIBUNISTRING = yes; then
> +     dnl Determine the installed version.
> +-- 
> +2.1.3
> +
> diff --git a/package/guile/0007-configure.ac-add-check-for-strtol_l-function.patch b/package/guile/0007-configure.ac-add-check-for-strtol_l-function.patch
> new file mode 100644
> index 0000000..fb6a116
> --- /dev/null
> +++ b/package/guile/0007-configure.ac-add-check-for-strtol_l-function.patch
> @@ -0,0 +1,47 @@
> +From 93e1a2b8eef99181ddf620414ae675e895f3a048 Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +Date: Wed, 10 Dec 2014 08:28:17 +0100
> +Subject: [PATCH 7/7] configure.ac: add check for strtol_l function
> +
> +Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> +---
> + configure.ac    | 9 +++++++++
> + libguile/i18n.c | 2 +-
> + 2 files changed, 10 insertions(+), 1 deletion(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 7af9c7b..92abc84 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -895,6 +895,15 @@ fi
> + AC_CHECK_DECLS([mpz_inits], [], [], [[#include <gmp.h>]])
> + CPPFLAGS="$save_CPPFLAGS"
> + 
> ++dnl strtol_l (locale) tests
> ++AC_MSG_CHECKING([for strtol_l])
> ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]],[[strtol_l (0, 0, 0, 0);]])],
> ++  [[HAVE_STRTOL_L=yes]], [[HAVE_STRTOL_L=no]])
> ++AC_MSG_RESULT($HAVE_STRTOL_L)
> ++if test "x$HAVE_STRTOL_L" = "xyes"; then
> ++  AC_DEFINE([HAVE_STRTOL_L], 1, [Define to 1 if strtol_l is defined])
> ++fi
> ++
> + dnl GNU libunistring is checked for by Gnulib's `libunistring' module.
> + LIBUNISTRING="-lunistring"
> + LIBS="$LIBUNISTRING $LIBS"
> +diff --git a/libguile/i18n.c b/libguile/i18n.c
> +index 395e528..2bb4812 100644
> +--- a/libguile/i18n.c
> ++++ b/libguile/i18n.c
> +@@ -40,7 +40,7 @@
> + #include <unicase.h>
> + #include <unistr.h>
> + 
> +-#if (defined HAVE_NEWLOCALE) && (defined HAVE_STRCOLL_L)
> ++#if (defined HAVE_NEWLOCALE) && (defined HAVE_STRCOLL_L) && defined(HAVE_STRTOL_L)
> + /* The GNU thread-aware locale API is documented in ``Thread-Aware Locale
> +    Model, a Proposal'', by Ulrich Drepper:
> + 
> +-- 
> +2.1.3
> +
> diff --git a/package/guile/guile.mk b/package/guile/guile.mk
> index 30af11d..238e39a 100644
> --- a/package/guile/guile.mk
> +++ b/package/guile/guile.mk
> @@ -11,6 +11,9 @@ GUILE_INSTALL_STAGING = YES
>  GUILE_LICENSE = LGPLv3+
>  GUILE_LICENSE_FILES = LICENSE COPYING COPYING.LESSER
>  
> +# autoreconf if needed because we are patching configure.ac and some *.m4 files
> +GUILE_AUTORECONF = YES
> +
>  # libtool dependency is needed because guile uses libltdl
>  GUILE_DEPENDENCIES = host-guile libunistring libffi gmp bdwgc host-pkgconf libtool
>  HOST_GUILE_DEPENDENCIES = host-libunistring host-libffi host-gmp host-bdwgc host-flex host-pkgconf host-gettext
> -- 
> 2.1.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-12-24 19:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-13 17:43 [Buildroot] [PATCH 1/3] bdwgc: add patch automatically detecting for NO_GETCONTEXT need Samuel Martin
2014-12-13 17:43 ` [Buildroot] [PATCH 2/3] package/guile: rename patch to new convention Samuel Martin
2014-12-21 22:11   ` Thomas Petazzoni
2014-12-13 17:43 ` [Buildroot] [PATCH 3/3] package/guile: fix build failure Samuel Martin
2014-12-24 19:03   ` Yann E. MORIN
2014-12-17 21:36 ` [Buildroot] [PATCH 1/3] bdwgc: add patch automatically detecting for NO_GETCONTEXT need Yann E. MORIN
2014-12-21 22:17   ` Thomas Petazzoni
2014-12-23 13:02     ` Yann E. MORIN
2014-12-23 22:18       ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox