[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, branch_release-1-8, updated. release_1
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] GNU Guile branch, branch_release-1-8, updated. release_1-8-6-46-g2b76a65 |
Date: |
Mon, 11 May 2009 20:14:09 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=2b76a655663640863319c7c1f39914dabd527291
The branch, branch_release-1-8 has been updated
via 2b76a655663640863319c7c1f39914dabd527291 (commit)
via cabfe198fd954fbf1c2afd839fd36eb20a803baf (commit)
from e9c9fd3d998135fe8fb5692cd52e196d55c45f5a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2b76a655663640863319c7c1f39914dabd527291
Author: Ludovic Courtès <address@hidden>
Date: Mon May 11 22:13:29 2009 +0200
Fix compilation of `test-round.c' on BSD.
* test-suite/standalone/test-round.c (HAVE_MACHINE_FPU_H): Include
<sys/types.h> when available. This fixes compilation on NetBSD.
Reported by Greg Toxel.
commit cabfe198fd954fbf1c2afd839fd36eb20a803baf
Author: Ludovic Courtès <address@hidden>
Date: Mon May 11 22:11:25 2009 +0200
Ask for IEEE floating point behavior on Alpha and SH.
* configure.in (CPPFLAGS): Add `-mieee' or `-ieee' on Alpha and SH.
* libguile/numbers.c (guile_ieee_init): Make sure `-mieee' was passed
when using GCC on Alpha.
* NEWS: Update.
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
configure.in | 34 ++++++++++++++++++++++++++++++++++
libguile/numbers.c | 7 +++++++
test-suite/standalone/test-round.c | 6 +++++-
4 files changed, 47 insertions(+), 1 deletions(-)
diff --git a/NEWS b/NEWS
index a65a813..fa92e32 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ Changes in 1.8.7 (since 1.8.6)
** Fix build problem when scm_t_timespec is different from struct timespec
** Fix build when compiled with -Wundef -Werror
** More build fixes for `alphaev56-dec-osf5.1b' (Tru64)
+** With GCC, always compile with `-mieee' on `alpha*' and `sh*'
** Allow @ macro to work with (ice-9 syncase)
diff --git a/configure.in b/configure.in
index b53b862..721394b 100644
--- a/configure.in
+++ b/configure.in
@@ -222,6 +222,40 @@ case "$use_64_calls" in
;;
esac
+AC_MSG_CHECKING([whether the compiler defaults to IEEE floating point
behavior])
+# The following snippet was taken from Gnulib's `fpieee'. See also the
definition
+# of `guile_NaN' in `numbers.c'.
+
+# IEEE behaviour is the default on all CPUs except Alpha and SH
+# (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
+# and the GCC 4.1.2 manual).
+case "$host_cpu" in
+alpha*)
+ # On Alpha systems, a compiler option provides the behaviour.
+ # See the ieee(3) manual page, also available at
+ #
<http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
+ AC_MSG_RESULT([no])
+ if test -n "$GCC"; then
+ # GCC has the option -mieee.
+ CPPFLAGS="$CPPFLAGS -mieee"
+ else
+ # Compaq (ex-DEC) C has the option -ieee.
+ CPPFLAGS="$CPPFLAGS -ieee"
+ fi
+ ;;
+sh*)
+ AC_MSG_RESULT([no])
+ if test -n "$GCC"; then
+ # GCC has the option -mieee.
+ CPPFLAGS="$CPPFLAGS -mieee"
+ fi
+ ;;
+*)
+ AC_MSG_RESULT([yes])
+ ;;
+esac
+
+
#--------------------------------------------------------------------
dnl Check for dynamic linking
diff --git a/libguile/numbers.c b/libguile/numbers.c
index 37435b5..25b0c1a 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -637,6 +637,13 @@ guile_ieee_init (void)
#if defined (HAVE_ISNAN)
+#if defined __GNUC__ && defined __alpha__ && !defined _IEEE_FP
+ /* On Alpha GCC must be passed `-mieee' to provide proper NaN handling.
+ See http://lists.gnu.org/archive/html/bug-gnulib/2009-05/msg00010.html
+ for more details. */
+# error NaN handling will not work when compiling without -mieee
+#endif
+
#ifdef NAN
/* C99 NAN, when available */
guile_NaN = NAN;
diff --git a/test-suite/standalone/test-round.c
b/test-suite/standalone/test-round.c
index f9b4077..1340fff 100644
--- a/test-suite/standalone/test-round.c
+++ b/test-suite/standalone/test-round.c
@@ -26,7 +26,11 @@
#if HAVE_FENV_H
#include <fenv.h>
#elif defined HAVE_MACHINE_FPU_H
-/* On Tru64 5.1b, the declaration of fesetround(3) is here. */
+/* On Tru64 5.1b, the declaration of fesetround(3) is in <machine/fpu.h>.
+ On NetBSD, this header has to be included along with <sys/types.h>. */
+# ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
# include <machine/fpu.h>
#endif
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, branch_release-1-8, updated. release_1-8-6-46-g2b76a65,
Ludovic Courtès <=