bdwgc: add patch automatically detecting for NO_GETCONTEXT need
PATCH 1/3 bdwgc: add patch automatically detecting for NO_GETCONTEXT need
This patch is necessary to successfully build guile with toolchain missing its support.
--- ...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
package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch new file +38 -0
@@ -0,0 +1,38 @@ +From e4448da044338f81548c13cb7eda2a49074156b3 Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]> +Date: Mon, 8 Dec 2014 21:17:10 +0100 +Subject: [PATCH] configure.ac: add check for NO_GETCONTEXT definition + +Signed-off-by: Samuel Martin <[email protected]> +--- + 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 +
Signature · 1 line
2.1.3
PATCH 2/3 package/guile: rename patch to new convention
---
.../{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%)package/guile/0001-fix_arm_endianness.patch renamed from package/guile/guile-01-fix_arm_endianness.patch +0 -0
package/guile/0002-calculate-csqrt_manually.patch renamed from package/guile/guile-02-calculate-csqrt_manually.patch +0 -0
package/guile/0003-remove_unused_funcs.patch renamed from package/guile/guile-03-remove_unused_funcs.patch +0 -0
Signature · 1 line
2.1.3
Thomas Petazzoni
AppliedPATCH 2/3 package/guile: rename patch to new convention
Dear Samuel Martin,
Quoted 9 lines · Samuel Martin
Signed-off-by Samuel Martin <[email protected]>--- .../{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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 3/3 package/guile: fix build failure
In reply to Samuel MartinThese 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/
--- ...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
package/guile/0004-configure.ac-use-AC_LINK_IFELSE-for-libltdl-check.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 86cf3d5cb164020918b0383e1a1105850f93fe70 Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]> +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 <[email protected]> +--- + 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 +
package/guile/0005-configure.ac-use-AC_LINK_IFELSE-for-libgmp-check.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 0f26f1e18f7591aaaeee5562d856ba350bb1be61 Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]> +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 <[email protected]> +--- + 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 +
package/guile/0006-configure.ac-use-AC_LINK_IFELSE-for-libunistring-che.patch new file +81 -0
81 lines not on this page · raw message
package/guile/0007-configure.ac-add-check-for-strtol_l-function.patch new file +47 -0
47 lines not on this page · raw message
package/guile/guile.mk +3 -0
@@ -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
Signature · 1 line
2.1.3
PATCH 3/3 package/guile: fix build failure
Samuel, All,
On 2014-12-13 18:43 +0100, Samuel Martin spake thusly:
Quoted 6 lines
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.
Quoted 6 lines
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.
Quoted 253 lines
Signed-off-by Samuel Martin <[email protected]>--- ...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.patchpackage/guile/0004-configure.ac-use-AC_LINK_IFELSE-for-libltdl-check.patch new file +32
-0@@ -0,0 +1,32 @@ +From 86cf3d5cb164020918b0383e1a1105850f93fe70 Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]> +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 <[email protected]> +--- + 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 +package/guile/0005-configure.ac-use-AC_LINK_IFELSE-for-libgmp-check.patch new file +35
-0@@ -0,0 +1,35 @@ +From 0f26f1e18f7591aaaeee5562d856ba350bb1be61 Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]> +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 <[email protected]> +--- + 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 +package/guile/0006-configure.ac-use-AC_LINK_IFELSE-for-libunistring-che.patch new file +81
-0@@ -0,0 +1,81 @@ +From 73222acb19916044611add0abbe470a11180a9eb Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]> +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 <[email protected]> +--- + 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 +package/guile/0007-configure.ac-add-check-for-strtol_l-function.patch new file +47
-0@@ -0,0 +1,47 @@ +From 93e1a2b8eef99181ddf620414ae675e895f3a048 Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]> +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 <[email protected]> +--- + 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 +package/guile/guile.mk +3
-0@@ -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-gettextSignature · 6 lines
2.1.3 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/3 bdwgc: add patch automatically detecting for NO_GETCONTEXT need
In reply to Samuel MartinSamuel, All,
On 2014-12-13 18:43 +0100, Samuel Martin spake thusly:
Quoted 29 lines
This patch is necessary to successfully build guile with toolchain missing its support.
Signed-off-by Samuel Martin <[email protected]>--- ...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.patchpackage/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch new file +14
-0@@ -0,0 +1,38 @@ +From e4448da044338f81548c13cb7eda2a49074156b3 Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]> +Date: Mon, 8 Dec 2014 21:17:10 +0100 +Subject: [PATCH] configure.ac: add check for NO_GETCONTEXT definition + +Signed-off-by: Samuel Martin <[email protected]> +--- + 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
package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch line 24
Quoted 10 lines
package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch new file +10
-0+@@ -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:
package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch line 31
Quoted 7 lines
package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch new file +7
-0++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.
Quoted 13 lines
package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch new file +6
-0+ 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 +Signature · 6 lines
2.1.3 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/3 bdwgc: add patch automatically detecting for NO_GETCONTEXT need
Dear Yann E. MORIN,
Quoted 14 lines · Yann E. MORIN
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_getcontextandHAVE_setcontextif they are available, but that's macro definitions, not available in configure, so we could not do the following:Quoted 5 lines
++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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/3 bdwgc: add patch automatically detecting for NO_GETCONTEXT need
Thomas, All,
On 2014-12-21 23:17 +0100, Thomas Petazzoni spake thusly:
Quoted 17 lines · Yann E. MORIN
Quoted 15 lines
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_getcontextandHAVE_setcontextif they are available, but that's macro definitions, not available in configure, so we could not do the following:Quoted 5 lines
++AC_MSG_RESULT($need_no_getcontext)
++if test x$need_no_getcontext = xyes ; then
++ CFLAGS="$CFLAGS -DNO_GETCONTEXT"
++ CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"
++fi
Quoted 4 lines
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.
Quoted 7 lines
if test x${has_getcontext} != xyes -o x${has_setcontext} != xyes; then
CFLAGS="$CFLAGS -DNO_GETCONTEXT" CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"
fiYou 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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/3 bdwgc: add patch automatically detecting for NO_GETCONTEXT need
Dear Yann E. MORIN,
Quoted 9 lines · Yann E. MORIN
Quoted 4 lines
Well, you can do:
AC_CHECK_FUNCS([getcontext], [has_getcontext=yes])AC_CHECK_FUNCS([setcontext], [has_setcontext=yes])Using
AC_CHECK_FUNCSis 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_CXXAC_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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com