summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-01-11 09:27:17 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-24 09:40:31 +0000
commit2ecfc02c409150eaae633429d0850253749af685 (patch)
treee16d51ebd11638818a2c0d7dcd977f2e3df0757b /meta/recipes-devtools
parent2df08b8a8966b15ca40720c0695f4e5f29944171 (diff)
downloadpoky-2ecfc02c409150eaae633429d0850253749af685.tar.gz
guile: Fix build with musl
strol_l is not available on musl delete charset.alias as well its not needed Use internal gc function on musl We get errors on certain functions not being available in boeheme gc when built with musl. Therefore use the internal versions e.g. Undefined gc_set_finalizer_notifier (From OE-Core rev: 31ee3460c3a0578ed36f3f5a940617ccb873c721) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch56
-rw-r--r--meta/recipes-devtools/guile/guile_2.0.11.bb12
2 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch b/meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch
new file mode 100644
index 0000000000..24f073f9fb
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch
@@ -0,0 +1,56 @@
1From 814d6fb6c1f4a544c8fd37f5a390ba020c2d8c85 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 10 Jan 2016 22:28:17 +0000
4Subject: [PATCH] libguile: Check for strtol_l during configure
5
6strtol_l is a gnu extention which may not be available on other linux
7libc implementations e.g. musl. Therefore check for this funciton and
8conditionalize the use of it.
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12Upstream-Status: Pending
13
14 configure.ac | 5 +++--
15 libguile/i18n.c | 2 +-
16 2 files changed, 4 insertions(+), 3 deletions(-)
17
18diff --git a/configure.ac b/configure.ac
19index 3969929..f8a6a1a 100644
20--- a/configure.ac
21+++ b/configure.ac
22@@ -752,7 +752,8 @@ AC_CHECK_HEADERS([assert.h crt_externs.h])
23 # truncate - not in mingw
24 # isblank - available as a GNU extension or in C99
25 # _NSGetEnviron - Darwin specific
26-# strcoll_l, newlocale - GNU extensions (glibc), also available on Darwin
27+# strcoll_l, newlocale, strtol_l - GNU extensions (glibc),
28+# also available on Darwin
29 # fork - unavailable on Windows
30 # utimensat - posix.1-2008
31 # sched_getaffinity, sched_setaffinity - GNU extensions (glibc)
32@@ -768,7 +769,7 @@ AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid \
33 getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp \
34 index bcopy memcpy rindex truncate unsetenv isblank _NSGetEnviron \
35 strcoll strcoll_l newlocale utimensat sched_getaffinity \
36- sched_setaffinity sendfile])
37+ sched_setaffinity sendfile strtol_l])
38
39 AM_CONDITIONAL([BUILD_ICE_9_POPEN],
40 [test "x$enable_posix" = "xyes" && test "x$ac_cv_func_fork" = "xyes"])
41diff --git a/libguile/i18n.c b/libguile/i18n.c
42index 97d44b0..9fb6976 100644
43--- a/libguile/i18n.c
44+++ b/libguile/i18n.c
45@@ -1352,7 +1352,7 @@ SCM_DEFINE (scm_locale_string_to_integer, "locale-string->integer",
46
47 if (c_locale != NULL)
48 {
49-#ifdef USE_GNU_LOCALE_API
50+#if defined(USE_GNU_LOCALE_API) && defined(HAVE_STRTOL_L)
51 c_result = strtol_l (c_str, &c_endptr, c_base, c_locale);
52 #else
53 RUN_IN_LOCALE_SECTION (c_locale,
54--
552.7.0
56
diff --git a/meta/recipes-devtools/guile/guile_2.0.11.bb b/meta/recipes-devtools/guile/guile_2.0.11.bb
index 413c81daac..6815e257d9 100644
--- a/meta/recipes-devtools/guile/guile_2.0.11.bb
+++ b/meta/recipes-devtools/guile/guile_2.0.11.bb
@@ -24,6 +24,7 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
24 file://libguile-Makefile.am-hook.patch \ 24 file://libguile-Makefile.am-hook.patch \
25 file://libguile-VM-ASM_MUL-for-ARM-Add-earlyclobber.patch \ 25 file://libguile-VM-ASM_MUL-for-ARM-Add-earlyclobber.patch \
26 file://remove_strcase_l_funcs.patch \ 26 file://remove_strcase_l_funcs.patch \
27 file://0001-libguile-Check-for-strtol_l-during-configure.patch \
27 " 28 "
28 29
29# file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch 30# file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
@@ -52,6 +53,13 @@ EXTRA_OECONF_append_class-target = " --with-libunistring-prefix=${STAGING_LIBDIR
52 --with-libgmp-prefix=${STAGING_LIBDIR} \ 53 --with-libgmp-prefix=${STAGING_LIBDIR} \
53 --with-libltdl-prefix=${STAGING_LIBDIR}" 54 --with-libltdl-prefix=${STAGING_LIBDIR}"
54EXTRA_OECONF_append_libc-uclibc = " guile_cv_use_csqrt=no " 55EXTRA_OECONF_append_libc-uclibc = " guile_cv_use_csqrt=no "
56
57CFLAGS_append_libc-musl = " -DHAVE_GC_SET_FINALIZER_NOTIFIER \
58 -DHAVE_GC_GET_HEAP_USAGE_SAFE \
59 -DHAVE_GC_GET_FREE_SPACE_DIVISOR \
60 -DHAVE_GC_SET_FINALIZE_ON_DEMAND \
61 "
62
55do_configure_prepend() { 63do_configure_prepend() {
56 mkdir -p po 64 mkdir -p po
57} 65}
@@ -77,6 +85,10 @@ do_install_append_class-target() {
77 sed -i -e 's:${STAGING_DIR_TARGET}::g' ${D}${libdir}/pkgconfig/guile-2.0.pc 85 sed -i -e 's:${STAGING_DIR_TARGET}::g' ${D}${libdir}/pkgconfig/guile-2.0.pc
78} 86}
79 87
88do_install_append_libc-musl() {
89 rm -f ${D}${libdir}/charset.alias
90}
91
80SYSROOT_PREPROCESS_FUNCS = "guile_cross_config" 92SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
81 93
82guile_cross_config() { 94guile_cross_config() {