4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-01 03:50:28 +08:00

2012-10-24 Jeff Johnston <jjohnstn@redhat.com>

* configure.in: Comment out the --enable-newlib-fp-hw option
        as the mathfp library is inaccurate and should not be used.
        * Makefile.am: Add comment regarding the mathfp directory.
        * configure: Regenerated.
        * Makefile.in: Ditto.
        * libm/mathfp/README: New file that details why the mathfp
        directory is not used.
This commit is contained in:
Jeff Johnston 2012-10-24 21:01:39 +00:00
parent 738ff2e83e
commit 6555743a4b
6 changed files with 53 additions and 22 deletions

View File

@ -1,3 +1,13 @@
2012-10-24 Jeff Johnston <jjohnstn@redhat.com>
* configure.in: Comment out the --enable-newlib-fp-hw option
as the mathfp library is inaccurate and should not be used.
* Makefile.am: Add comment regarding the mathfp directory.
* configure: Regenerated.
* Makefile.in: Ditto.
* libm/mathfp/README: New file that details why the mathfp
directory is not used.
2012-10-22 Jon TURNEY <jon.turney@dronecode.org.uk> 2012-10-22 Jon TURNEY <jon.turney@dronecode.org.uk>
* libc/include/string.h (strdup, strndup): Declare if not * libc/include/string.h (strdup, strndup): Declare if not

View File

@ -13,6 +13,10 @@ MULTICLEAN = true
LIBTOOL_VERSION_INFO = 0:0:0 LIBTOOL_VERSION_INFO = 0:0:0
# The newlib hardware floating-point routines have been disabled due to
# inaccuracy. If you wish to work on them, you will need to edit the
# configure.in file to re-enable the configuration option. By default,
# the NEWLIB_HW_FP variable will always be false.
if NEWLIB_HW_FP if NEWLIB_HW_FP
MATHDIR = mathfp MATHDIR = mathfp
else else

View File

@ -297,6 +297,11 @@ MULTIDO = true
MULTICLEAN = true MULTICLEAN = true
LIBTOOL_VERSION_INFO = 0:0:0 LIBTOOL_VERSION_INFO = 0:0:0
@NEWLIB_HW_FP_FALSE@MATHDIR = math @NEWLIB_HW_FP_FALSE@MATHDIR = math
# The newlib hardware floating-point routines have been disabled due to
# inaccuracy. If you wish to work on them, you will need to edit the
# configure.in file to re-enable the configuration option. By default,
# the NEWLIB_HW_FP variable will always be false.
@NEWLIB_HW_FP_TRUE@MATHDIR = mathfp @NEWLIB_HW_FP_TRUE@MATHDIR = mathfp
# Work around what appears to be a GNU make bug handling MAKEFLAGS # Work around what appears to be a GNU make bug handling MAKEFLAGS

25
newlib/configure vendored
View File

@ -804,7 +804,6 @@ with_pic
enable_fast_install enable_fast_install
with_gnu_ld with_gnu_ld
enable_libtool_lock enable_libtool_lock
enable_newlib_hw_fp
' '
ac_precious_vars='build_alias ac_precious_vars='build_alias
host_alias host_alias
@ -1469,7 +1468,6 @@ Optional Features:
--enable-fast-install[=PKGS] --enable-fast-install[=PKGS]
optimize for fast installation [default=yes] optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds) --disable-libtool-lock avoid locking (might break parallel builds)
--enable-newlib-hw-fp Turn on hardware floating point math
Optional Packages: Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -11641,7 +11639,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11644 "configure" #line 11642 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -11747,7 +11745,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11750 "configure" #line 11748 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -11986,17 +11984,14 @@ CC="$lt_save_CC"
fi fi
# Check whether --enable-newlib_hw_fp was given. newlib_hw_fp=false
if test "${enable_newlib_hw_fp+set}" = set; then : #AC_ARG_ENABLE(newlib_hw_fp,
enableval=$enable_newlib_hw_fp; case "${enableval}" in #[ --enable-newlib-hw-fp Turn on hardware floating point math],
yes) newlib_hw_fp=true ;; #[case "${enableval}" in
no) newlib_hw_fp=false ;; # yes) newlib_hw_fp=true ;;
*) as_fn_error $? "bad value ${enableval} for --enable-newlib-hw-fp" "$LINENO" 5 ;; # no) newlib_hw_fp=false ;;
esac # *) AC_MSG_ERROR(bad value ${enableval} for --enable-newlib-hw-fp) ;;
else # esac],[newlib_hw_fp=false])
newlib_hw_fp=false
fi
if test x$newlib_hw_fp = xtrue; then if test x$newlib_hw_fp = xtrue; then
NEWLIB_HW_FP_TRUE= NEWLIB_HW_FP_TRUE=
NEWLIB_HW_FP_FALSE='#' NEWLIB_HW_FP_FALSE='#'

View File

@ -137,13 +137,19 @@ AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL AM_PROG_LIBTOOL
fi fi
AC_ARG_ENABLE(newlib_hw_fp, dnl The following is being disabled because the mathfp library is
[ --enable-newlib-hw-fp Turn on hardware floating point math], dnl not up to standard due to inaccuracies caused by some of the
[case "${enableval}" in dnl floating-point algorithms used. If you wish to work on this,
yes) newlib_hw_fp=true ;; dnl comment out the following line and uncomment out the lines
no) newlib_hw_fp=false ;; dnl following it to re-enable the feature.
*) AC_MSG_ERROR(bad value ${enableval} for --enable-newlib-hw-fp) ;; newlib_hw_fp=false
esac],[newlib_hw_fp=false]) #AC_ARG_ENABLE(newlib_hw_fp,
#[ --enable-newlib-hw-fp Turn on hardware floating point math],
#[case "${enableval}" in
# yes) newlib_hw_fp=true ;;
# no) newlib_hw_fp=false ;;
# *) AC_MSG_ERROR(bad value ${enableval} for --enable-newlib-hw-fp) ;;
# esac],[newlib_hw_fp=false])
AM_CONDITIONAL(NEWLIB_HW_FP, test x$newlib_hw_fp = xtrue) AM_CONDITIONAL(NEWLIB_HW_FP, test x$newlib_hw_fp = xtrue)
# These get added in the top-level configure.in, except in the case where # These get added in the top-level configure.in, except in the case where

11
newlib/libm/mathfp/README Normal file
View File

@ -0,0 +1,11 @@
This directory was an experiment to use floating-point operations to implement
the math library when a processor had a floating-point instruction set. The
experiment was a failure in that some of the algorithms chosen (e.g. recursive
algorithms for sin/cos, etc..) are too simple and do not provide proper accuracy
nor handle very large or very small inputs adequately.
The code is considered moth-balled. The stable math library routines can be
found in libm/math and the configuration option to use this has been removed.
If you wish to experiment with the concept, please feel free and report back if
you have major improvements.