From: Pedro Aguilar <paguilar@paguilar.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 4/4] guile: new package
Date: Tue, 04 Nov 2014 01:04:19 +0100 [thread overview]
Message-ID: <54581803.7060705@paguilar.org> (raw)
In-Reply-To: <20141103082958.2cf6cffe@free-electrons.com>
Hi Thomas,
Thanks for your comments and support.
I've already fixed Config.in and guile.mk.
Regarding the guile patches:
On 03/11/2014 08:29, Thomas Petazzoni wrote:
> Dear Pedro Aguilar,
>
> On Mon, 3 Nov 2014 01:34:11 +0100, Pedro Aguilar wrote:
>> diff --git a/package/guile/guile-01-fix_arm_endianness.patch b/package/guile/guile-01-fix_arm_endianness.patch
>> new file mode 100644
>> index 0000000..f3a2092
>> --- /dev/null
>> +++ b/package/guile/guile-01-fix_arm_endianness.patch
>> @@ -0,0 +1,19 @@
>> +Fix support for ARM endianness, otherwise it gives the error
>> +"unknown CPU endianness"
>> +
>> +Signed-off-by: Pedro Aguilar <paguilar@paguilar.org>
>
> Can you submit this patch upstream to the guile developers? Please Cc
> me when sending the patch upstream, as I know the Guile maintainer, so
> seeing my name in Cc will probably make him look at the patch :)
I just noticed that this is already fixed in their git repo, so I
changed the patch that reflects their fix.
>> diff --git a/package/guile/guile-02-calculate-csqrt_manually.patch b/package/guile/guile-02-calculate-csqrt_manually.patch
>> new file mode 100644
>> index 0000000..c56963b
>> --- /dev/null
>> +++ b/package/guile/guile-02-calculate-csqrt_manually.patch
>> @@ -0,0 +1,17 @@
>> +Calculate manually the sqrt() since scm_from_complex_double() gives an error
>> +on ARM using uclibc.
>> +
>> +Signed-off-by: Pedro Aguilar <paguilar@paguilar.org>
>> +
>> +diff -Nau guile-2.0.11.orig/libguile/i18n.c guile-2.0.11/libguile/i18n.c
>> +--- guile-2.0.11.orig/libguile/numbers.c 2014-03-12 14:24:54.000000000 +0100
>> ++++ guile-2.0.11/libguile/numbers.c 2014-11-01 21:07:20.301263587 +0100
>> +@@ -10260,8 +10260,6 @@
>> + {
>> + #if defined HAVE_COMPLEX_DOUBLE && defined HAVE_USABLE_CSQRT \
>> + && defined SCM_COMPLEX_VALUE
>> +- return scm_from_complex_double (csqrt (SCM_COMPLEX_VALUE (z)));
>> +-#else
>> + double re = SCM_COMPLEX_REAL (z);
>> + double im = SCM_COMPLEX_IMAG (z);
>> + return scm_c_make_polar (sqrt (hypot (re, im)),
>
> It would be good to have an upstreamable version of this. Since uClibc
> doesn't implement C99 complex math, I believe HAVE_USABLE_CSQRT should
> be false. Can you check why it isn't the case?
They only use HAVE_USABLE_CSQRT because of a bug in old glibc versions
and they set it to 1 if this bug is not present. Since uclibc doesn't
have this bug, HAVE_USABLE_CSQRT is always 1.
I modified configure.ac and if we're cross-compiling, it sets
HAVE_USABLE_CSQRT to 0. This would be a safe default since disabling
this define doesn't break anything:
diff -Nau guile-2.0.11.orig/configure.ac guile-2.0.11/configure.ac
--- guile-2.0.11.orig/configure.ac 2014-03-12 14:36:02.000000000 +0100
+++ guile-2.0.11/configure.ac 2014-11-03 23:59:51.897267207 +0100
@@ -862,7 +862,7 @@
}]])],
[guile_cv_use_csqrt=yes],
[guile_cv_use_csqrt="no, glibc 2.3 bug"],
- [guile_cv_use_csqrt="yes, hopefully (cross-compiling)"])])
+ [guile_cv_use_csqrt="no (cross-compiling)"])])
case $guile_cv_use_csqrt in
yes*)
AC_DEFINE([HAVE_USABLE_CSQRT], 1, [Define to 1 if csqrt is
bug-free])
>> diff --git a/package/guile/guile-03-undef_use_gnu_local_locale_api.patch b/package/guile/guile-03-undef_use_gnu_local_locale_api.patch
>> new file mode 100644
>> index 0000000..b8ac7c3
>> --- /dev/null
>> +++ b/package/guile/guile-03-undef_use_gnu_local_locale_api.patch
>> @@ -0,0 +1,16 @@
>> +Undef USE_GNU_LOCALE_API since it's not mandatory.
>> +
>> +Signed-off-by: Pedro Aguilar <paguilar@paguilar.org>
>> +
>> +diff -Nau guile-2.0.11.orig/libguile/i18n.c guile-2.0.11/libguile/i18n.c
>> +--- guile-2.0.11.orig/libguile/i18n.c 2014-01-21 22:25:11.000000000 +0100
>> ++++ guile-2.0.11/libguile/i18n.c 2014-11-01 21:59:29.001195319 +0100
>> +@@ -54,7 +54,7 @@
>> + Specifications Issue 7'' (aka. "POSIX 2008"):
>> +
>> + http://www.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html */
>> +-# define USE_GNU_LOCALE_API
>> ++# undef USE_GNU_LOCALE_API
>
> Can you explain a bit more? Again, our goal is to have patches that can
> potentially be accepted by the upstream project.
With this patch I avoid the compilation error 'dereferencing pointer to
incomplete type' caused by an alias for glibc's locale type.
Since guile works fine without this define, may be the proper patch
would be to enable/disable it according to the used library (glib,
uclibc, ...) although I'm not sure how to do this at 'configure' time.
Do you have any suggestion or different ideas?
Thanks!
--
Pedro Aguilar
http://paguilar.org
prev parent reply other threads:[~2014-11-04 0:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 0:34 [Buildroot] [PATCH v2 0/4] package/guile: New package Pedro Aguilar
2014-11-03 0:34 ` [Buildroot] [PATCH v2 1/4] libatomic_ops: Add host-autotools-package Pedro Aguilar
2014-11-03 0:34 ` [Buildroot] [PATCH v2 2/4] bdwgc: new package Pedro Aguilar
2014-11-03 21:24 ` Arnout Vandecappelle
2014-11-04 0:14 ` Pedro Aguilar
2014-11-03 0:34 ` [Buildroot] [PATCH v2 3/4] libunistring: Add host-autotools-package Pedro Aguilar
2014-11-03 0:34 ` [Buildroot] [PATCH v2 4/4] guile: new package Pedro Aguilar
2014-11-03 7:29 ` Thomas Petazzoni
2014-11-04 0:04 ` Pedro Aguilar [this message]
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=54581803.7060705@paguilar.org \
--to=paguilar@paguilar.org \
--cc=buildroot@busybox.net \
/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