aclocal.m4 (AC_GCC_C_LONG_DOUBLE): New macro.

* aclocal.m4 (AC_GCC_C_LONG_DOUBLE): New macro.

        * configure.in (AC_GCC_C_LONG_DOUBLE): Call it.

        * gansidecl.h (HAVE_LONG_DOUBLE): Define if gcc for stage2.

        * ggc-simple.c (HAVE_LONG_DOUBLE): Test before using long double.

From-SVN: r29432
This commit is contained in:
Kaveh R. Ghazi 1999-09-15 13:53:46 +00:00 committed by Kaveh Ghazi
parent 0d1416c6a2
commit 04cabffc4e
7 changed files with 269 additions and 189 deletions

View File

@ -1,3 +1,13 @@
Wed Sep 15 09:50:18 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* aclocal.m4 (AC_GCC_C_LONG_DOUBLE): New macro.
* configure.in (AC_GCC_C_LONG_DOUBLE): Call it.
* gansidecl.h (HAVE_LONG_DOUBLE): Define if gcc for stage2.
* ggc-simple.c (HAVE_LONG_DOUBLE): Test before using long double.
Wed Sep 15 11:04:43 1999 Bernd Schmidt <bernds@cygnus.co.uk>
* function.c (assign_parms): Delete arg SECOND_TIME. Don't test it,

19
gcc/aclocal.m4 vendored
View File

@ -172,6 +172,25 @@ if test $gcc_cv_c_volatile = yes ; then
fi
])
dnl Check whether long double is supported. This differs from the
dnl built-in autoconf test in that it works for cross compiles.
AC_DEFUN(AC_GCC_C_LONG_DOUBLE,
[AC_CACHE_CHECK(for long double, gcc_cv_c_long_double,
[if test "$GCC" = yes; then
gcc_cv_c_long_double=yes
else
AC_TRY_COMPILE(,
[/* The Stardent Vistra knows sizeof(long double), but does not support it. */
long double foo = 0.0;
/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;],
gcc_cv_c_long_double=yes, gcc_cv_c_long_double=no)
fi])
if test $gcc_cv_c_long_double = yes; then
AC_DEFINE(HAVE_LONG_DOUBLE)
fi
])
dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
dnl of the usual 2.
AC_DEFUN(GCC_FUNC_MKDIR_TAKES_ONE_ARG,

View File

@ -165,6 +165,9 @@
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
/* Define if the `long double' type works. */
#undef HAVE_LONG_DOUBLE
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP

418
gcc/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -284,6 +284,7 @@ AC_CANONICAL_SYSTEM
# Find the native compiler
AC_PROG_CC
AC_GCC_C_LONG_DOUBLE
# If the native compiler is GCC, we can enable warnings even in stage1.
# That's useful for people building cross-compilers, or just running a

View File

@ -45,6 +45,9 @@ Boston, MA 02111-1307, USA. */
# undef const
# undef inline
# define inline __inline__ /* Modern gcc can use `__inline__' freely. */
# ifndef HAVE_LONG_DOUBLE
# define HAVE_LONG_DOUBLE 1
# endif
#endif /* GCC >= 2.7 */
#ifndef NULL_PTR

View File

@ -86,7 +86,11 @@ struct ggc_any
union {
char c;
HOST_WIDE_INT i;
#ifdef HAVE_LONG_DOUBLE
long double d;
#else
double d;
#endif
} u;
};