2009-05-15 Craig Howland <howland@LGSInnovations.com>
* configure.in: Add configuration test for long double type existing and set flag _HAVE_LONG_DOUBLE if true. Fix INIT_ARRAY (.init_array) and _LDBL_EQ_DBL tests to not link so that will work with cross-compilers. * configure: Regenerated. * Makefile.in: Ditto. * newlib.hin: Add _HAVE_LONG_DOUBLE flag. * libc/include/math.h: Change non-builtin defines for HUGE_VAL, HUGE_VALF, and HUGE_VALL to be constant expressions. Add definitions for the non-builtin case for INFINITY and NAN. Gate HUGE_VALL and union __ldmath definitions with (new) _HAVE_LONG_DOUBLE. *libm/common/s_infconst.c: Change definitions to use values from float.h instead of non-so-portable integer forms. Mark as being deprecated (because now removed from math.h, are not used anywhere in Newlib, itself).
This commit is contained in:
74
newlib/configure
vendored
74
newlib/configure
vendored
@ -462,7 +462,7 @@ ac_subdirs_all="$ac_subdirs_all libc"
|
||||
ac_subdirs_all="$ac_subdirs_all libm"
|
||||
ac_subdirs_all="$ac_subdirs_all doc"
|
||||
ac_subdirs_all="$ac_subdirs_all iconvdata"
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAY_SUPPLY_SYSCALLS_TRUE MAY_SUPPLY_SYSCALLS_FALSE newlib_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB READELF ac_ct_READELF MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CCAS CCASFLAGS NEWLIB_CFLAGS LDFLAGS ELIX_LEVEL_0_TRUE ELIX_LEVEL_0_FALSE ELIX_LEVEL_1_TRUE ELIX_LEVEL_1_FALSE ELIX_LEVEL_2_TRUE ELIX_LEVEL_2_FALSE ELIX_LEVEL_3_TRUE ELIX_LEVEL_3_FALSE ELIX_LEVEL_4_TRUE ELIX_LEVEL_4_FALSE USE_LIBTOOL_TRUE USE_LIBTOOL_FALSE OBJEXT oext aext lpfx libm_machine_dir machine_dir sys_dir SED DLLTOOL ac_ct_DLLTOOL OBJDUMP ac_ct_OBJDUMP LIBTOOL CFLAGS CPPFLAGS ac_ct_CC EXEEXT EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CPP NEWLIB_HW_FP_TRUE NEWLIB_HW_FP_FALSE CC_FOR_NEWLIB subdirs HAVE_DOC_TRUE HAVE_DOC_FALSE EXTRA_DIRS CRT0 CRT0_DIR CRT1 CRT1_DIR LIBM_MACHINE_OBJECTLIST MACHINE_OBJECTLIST SYS_OBJECTLIST SYS_MACH_OBJECTLIST POSIX_OBJECTLIST SIGNAL_OBJECTLIST SYSCALL_OBJECTLIST UNIX_OBJECTLIST STDIO64_OBJECTLIST CC_FOR_BUILD libc_cv_initfinit_array LIBOBJS LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAY_SUPPLY_SYSCALLS_TRUE MAY_SUPPLY_SYSCALLS_FALSE newlib_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB READELF ac_ct_READELF MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CCAS CCASFLAGS NEWLIB_CFLAGS LDFLAGS ELIX_LEVEL_0_TRUE ELIX_LEVEL_0_FALSE ELIX_LEVEL_1_TRUE ELIX_LEVEL_1_FALSE ELIX_LEVEL_2_TRUE ELIX_LEVEL_2_FALSE ELIX_LEVEL_3_TRUE ELIX_LEVEL_3_FALSE ELIX_LEVEL_4_TRUE ELIX_LEVEL_4_FALSE USE_LIBTOOL_TRUE USE_LIBTOOL_FALSE OBJEXT oext aext lpfx libm_machine_dir machine_dir sys_dir SED DLLTOOL ac_ct_DLLTOOL OBJDUMP ac_ct_OBJDUMP LIBTOOL CFLAGS CPPFLAGS ac_ct_CC EXEEXT EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CPP NEWLIB_HW_FP_TRUE NEWLIB_HW_FP_FALSE CC_FOR_NEWLIB subdirs HAVE_DOC_TRUE HAVE_DOC_FALSE EXTRA_DIRS CRT0 CRT0_DIR CRT1 CRT1_DIR LIBM_MACHINE_OBJECTLIST MACHINE_OBJECTLIST SYS_OBJECTLIST SYS_MACH_OBJECTLIST POSIX_OBJECTLIST SIGNAL_OBJECTLIST SYSCALL_OBJECTLIST UNIX_OBJECTLIST STDIO64_OBJECTLIST CC_FOR_BUILD libc_cv_initfinit_array HAVE_LONG_DOUBLE_TRUE HAVE_LONG_DOUBLE_FALSE LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@ -11874,8 +11874,8 @@ int __start (void) { return 0; }
|
||||
int foo (void) { return 1; }
|
||||
int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
|
||||
EOF
|
||||
if { ac_try='${CC} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
|
||||
-static -nostartfiles -nostdlib 1>&5'
|
||||
if { ac_try='${CC} $CFLAGS $CPPFLAGS -c -o conftest conftest.c
|
||||
1>&5'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
@ -11902,8 +11902,59 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
echo "$as_me:$LINENO: checking long double equals double" >&5
|
||||
echo $ECHO_N "checking long double equals double... $ECHO_C" >&6
|
||||
echo "$as_me:$LINENO: checking whether long double type exists" >&5
|
||||
echo $ECHO_N "checking whether long double type exists... $ECHO_C" >&6
|
||||
if test "${acnewlib_cv_type_long_double+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat > conftest.c <<EOF
|
||||
/* Check two ways: float.h defines and direct type declaration. */
|
||||
#include <float.h>
|
||||
#if defined(LDBL_MANT_DIG)
|
||||
#define _HAVE_LONG_DOUBLE
|
||||
#else
|
||||
#error "LDBL != DBL"
|
||||
#endif
|
||||
long double test() {
|
||||
long double ld = 0.0L;
|
||||
return ld;
|
||||
}
|
||||
EOF
|
||||
if { ac_try='${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
|
||||
1>&5'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }
|
||||
then
|
||||
acnewlib_cv_type_long_double=yes;
|
||||
else
|
||||
acnewlib_cv_type_long_double=no;
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $acnewlib_cv_type_long_double" >&5
|
||||
echo "${ECHO_T}$acnewlib_cv_type_long_double" >&6
|
||||
if test $acnewlib_cv_type_long_double = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define _HAVE_LONG_DOUBLE 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if test x"$acnewlib_cv_type_long_double" = x"yes"; then
|
||||
HAVE_LONG_DOUBLE_TRUE=
|
||||
HAVE_LONG_DOUBLE_FALSE='#'
|
||||
else
|
||||
HAVE_LONG_DOUBLE_TRUE='#'
|
||||
HAVE_LONG_DOUBLE_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking whether long double equals double" >&5
|
||||
echo $ECHO_N "checking whether long double equals double... $ECHO_C" >&6
|
||||
if test "${newlib_ldbl_eq_dbl+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
@ -11916,8 +11967,8 @@ else
|
||||
#error "LDBL != DBL"
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
|
||||
-static -nostartfiles -nostdlib 1>&5'
|
||||
if { ac_try='${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
|
||||
1>&5'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
@ -12123,6 +12174,13 @@ echo "$as_me: error: conditional \"HAVE_DOC\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
if test -z "${HAVE_LONG_DOUBLE_TRUE}" && test -z "${HAVE_LONG_DOUBLE_FALSE}"; then
|
||||
{ { echo "$as_me:$LINENO: error: conditional \"HAVE_LONG_DOUBLE\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." >&5
|
||||
echo "$as_me: error: conditional \"HAVE_LONG_DOUBLE\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
: ${CONFIG_STATUS=./config.status}
|
||||
ac_clean_files_save=$ac_clean_files
|
||||
@ -13050,6 +13108,8 @@ s,@UNIX_OBJECTLIST@,$UNIX_OBJECTLIST,;t t
|
||||
s,@STDIO64_OBJECTLIST@,$STDIO64_OBJECTLIST,;t t
|
||||
s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
|
||||
s,@libc_cv_initfinit_array@,$libc_cv_initfinit_array,;t t
|
||||
s,@HAVE_LONG_DOUBLE_TRUE@,$HAVE_LONG_DOUBLE_TRUE,;t t
|
||||
s,@HAVE_LONG_DOUBLE_FALSE@,$HAVE_LONG_DOUBLE_FALSE,;t t
|
||||
s,@LIBOBJS@,$LIBOBJS,;t t
|
||||
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
|
||||
CEOF
|
||||
|
Reference in New Issue
Block a user