mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-14 01:30:19 +02:00
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.
This commit is contained in:
parent
e9c9fd3d99
commit
cabfe198fd
3 changed files with 42 additions and 0 deletions
1
NEWS
1
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)
|
||||
|
||||
|
|
34
configure.in
34
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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue