aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2006-02-23 09:58:22 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2006-02-23 09:58:22 +0100
commited965309dad6553ada999c70724c57817ac1eb36 (patch)
tree88bb99ad558cf709fbf8381f220ed61566198f97 /gcc
parent29b1a829ad808af23cf04ddded483b3c42fe37b4 (diff)
downloadgcc-ed965309dad6553ada999c70724c57817ac1eb36.zip
gcc-ed965309dad6553ada999c70724c57817ac1eb36.tar.gz
gcc-ed965309dad6553ada999c70724c57817ac1eb36.tar.bz2
[multiple changes]
2006-02-23 Jakub Jelinek <jakub@redhat.com> * configure.ac: Add --with{,out}-long-double-128 configure option. (TARGET_DEFAULT_LONG_DOUBLE_128): New test. * configure: Rebuilt. * config.in: Rebuilt. * doc/install.texi (Options specification): Document --with-long-double-128. * config/rs6000/linux.h [TARGET_DEFAULT_LONG_DOUBLE_128] (RS6000_DEFAULT_LONG_DOUBLE_SIZE): Define to 128. * config/rs6000/linux64.h [TARGET_DEFAULT_LONG_DOUBLE_128] (RS6000_DEFAULT_LONG_DOUBLE_SIZE): Define to 128. 2006-02-23 Aldy Hernandez <aldyh@redhat.com> * config/s390/s390.c (override_options): Handle TARGET_DEFAULT_LONG_DOUBLE_128. * config/alpha/alpha.c (override_options): Handle TARGET_DEFAULT_LONG_DOUBLE_128. * config/sparc/sparc.c (sparc_override_options): Handle TARGET_DEFAULT_LONG_DOUBLE_128. From-SVN: r111381
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog25
-rw-r--r--gcc/config.in6
-rw-r--r--gcc/config/alpha/alpha.c5
-rw-r--r--gcc/config/rs6000/linux.h5
-rw-r--r--gcc/config/rs6000/linux64.h5
-rw-r--r--gcc/config/s390/s390.c5
-rw-r--r--gcc/config/sparc/sparc.c5
-rwxr-xr-xgcc/configure43
-rw-r--r--gcc/configure.ac33
-rw-r--r--gcc/doc/install.texi8
10 files changed, 139 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8470fa8..2b327b9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,28 @@
+2006-02-23 Jakub Jelinek <jakub@redhat.com>
+
+ * configure.ac: Add --with{,out}-long-double-128 configure option.
+ (TARGET_DEFAULT_LONG_DOUBLE_128): New test.
+ * configure: Rebuilt.
+ * config.in: Rebuilt.
+ * doc/install.texi (Options specification): Document
+ --with-long-double-128.
+
+ * config/rs6000/linux.h [TARGET_DEFAULT_LONG_DOUBLE_128]
+ (RS6000_DEFAULT_LONG_DOUBLE_SIZE): Define to 128.
+ * config/rs6000/linux64.h [TARGET_DEFAULT_LONG_DOUBLE_128]
+ (RS6000_DEFAULT_LONG_DOUBLE_SIZE): Define to 128.
+
+2006-02-23 Aldy Hernandez <aldyh@redhat.com>
+
+ * config/s390/s390.c (override_options): Handle
+ TARGET_DEFAULT_LONG_DOUBLE_128.
+
+ * config/alpha/alpha.c (override_options): Handle
+ TARGET_DEFAULT_LONG_DOUBLE_128.
+
+ * config/sparc/sparc.c (sparc_override_options): Handle
+ TARGET_DEFAULT_LONG_DOUBLE_128.
+
2006-02-22 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.in (stmp-fixinc): Use real-$(INSTALL_HEADERS_DIR).
diff --git a/gcc/config.in b/gcc/config.in
index bb262d8..98e3438 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -1283,6 +1283,12 @@
#endif
+/* Define if TFmode long double should be the default */
+#ifndef USED_FOR_TARGET
+#undef TARGET_DEFAULT_LONG_DOUBLE_128
+#endif
+
+
/* Define if your target C library provides stack protector support */
#ifndef USED_FOR_TARGET
#undef TARGET_LIBC_PROVIDES_SSP
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 909035a..14d5438 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -516,6 +516,11 @@ override_options (void)
REAL_MODE_FORMAT (DFmode) = &vax_g_format;
REAL_MODE_FORMAT (TFmode) = NULL;
}
+
+#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
+ if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
+ target_flags |= MASK_LONG_DOUBLE_128;
+#endif
}
/* Returns 1 if VALUE is a mask that contains full bytes of zero or ones. */
diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
index 1816d0f..3df356f 100644
--- a/gcc/config/rs6000/linux.h
+++ b/gcc/config/rs6000/linux.h
@@ -120,3 +120,8 @@
#endif
#define POWERPC_LINUX
+
+/* ppc linux has 128-bit long double support in glibc 2.4 and later. */
+#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
+#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
+#endif
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index d292380..26f7496 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -584,3 +584,8 @@ while (0)
#endif
#define POWERPC_LINUX
+
+/* ppc{32,64} linux has 128-bit long double support in glibc 2.4 and later. */
+#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
+#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
+#endif
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 3eeb4ac..2ebe8ac 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -1415,6 +1415,11 @@ override_options (void)
}
else if (s390_stack_guard)
error ("-mstack-guard implies use of -mstack-size");
+
+#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
+ if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
+ target_flags |= MASK_LONG_DOUBLE_128;
+#endif
}
/* Map for smallest class containing reg regno. */
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index b5781ac..f44c6d0 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -791,6 +791,11 @@ sparc_override_options (void)
sparc_costs = &ultrasparc3_costs;
break;
};
+
+#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
+ if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
+ target_flags |= MASK_LONG_DOUBLE_128;
+#endif
}
#ifdef SUBTARGET_ATTRIBUTE_TABLE
diff --git a/gcc/configure b/gcc/configure
index 5a225da..b07c286 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -932,6 +932,7 @@ Optional Packages:
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and libdir
--with-system-libunwind use installed libunwind
+ --with-long-double-128 Use 128-bit long double by default.
--with-gc={page,zone} choose the garbage collection mechanism to use
with the compiler
--with-system-zlib use installed libz
@@ -7612,7 +7613,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
else
ac_prog_version=`$MAKEINFO --version 2>&1 |
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
- echo "configure:7615: version of makeinfo is $ac_prog_version" >&5
+ echo "configure:7616: version of makeinfo is $ac_prog_version" >&5
case $ac_prog_version in
'') gcc_cv_prog_makeinfo_modern=no;;
4.[4-9]*)
@@ -15675,6 +15676,46 @@ _ACEOF
fi
+# Check if TFmode long double should be used by default or not.
+# Some glibc targets used DFmode long double, but with glibc 2.4
+# and later they can use TFmode.
+case "$target" in
+ powerpc*-*-*gnu* | \
+ sparc*-*-linux* | \
+ s390*-*-linux* | \
+ alpha*-*-linux*)
+
+# Check whether --with-long-double-128 or --without-long-double-128 was given.
+if test "${with_long_double_128+set}" = set; then
+ withval="$with_long_double_128"
+ gcc_cv_target_ldbl128="$with_long_double_128"
+else
+ gcc_cv_target_ldbl128=no
+ if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
+ if test "x$with_sysroot" = x; then
+ glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
+ elif test "x$with_sysroot" = xyes; then
+ glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
+ else
+ glibc_header_dir="${with_sysroot}/usr/include"
+ fi
+ else
+ glibc_header_dir=/usr/include
+ fi
+ grep '^ *#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
+ $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
+ && gcc_cv_target_ldbl128=yes
+fi;
+ ;;
+esac
+if test x$gcc_cv_target_ldbl128 = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TARGET_DEFAULT_LONG_DOUBLE_128 1
+_ACEOF
+
+fi
+
# Find out what GC implementation we want, or may, use.
# Check whether --with-gc or --without-gc was given.
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 7b9a94f..1b8feab 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3176,6 +3176,39 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then
[Define if your target C library provides stack protector support])
fi
+# Check if TFmode long double should be used by default or not.
+# Some glibc targets used DFmode long double, but with glibc 2.4
+# and later they can use TFmode.
+case "$target" in
+ powerpc*-*-*gnu* | \
+ sparc*-*-linux* | \
+ s390*-*-linux* | \
+ alpha*-*-linux*)
+ AC_ARG_WITH(long-double-128,
+[ --with-long-double-128 Use 128-bit long double by default.],
+ gcc_cv_target_ldbl128="$with_long_double_128",
+ [gcc_cv_target_ldbl128=no
+ if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
+ if test "x$with_sysroot" = x; then
+ glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
+ elif test "x$with_sysroot" = xyes; then
+ glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
+ else
+ glibc_header_dir="${with_sysroot}/usr/include"
+ fi
+ else
+ glibc_header_dir=/usr/include
+ fi
+ grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
+ $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
+ && gcc_cv_target_ldbl128=yes])
+ ;;
+esac
+if test x$gcc_cv_target_ldbl128 = xyes; then
+ AC_DEFINE(TARGET_DEFAULT_LONG_DOUBLE_128, 1,
+ [Define if TFmode long double should be the default])
+fi
+
# Find out what GC implementation we want, or may, use.
AC_ARG_WITH(gc,
[ --with-gc={page,zone} choose the garbage collection mechanism to use
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 9ac21ee..11da1c8 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -1259,6 +1259,14 @@ extension. This is enabled by default only on PowerPC GNU/Linux
systems. Other systems may also support it, but require the user to
specifically enable it.
+@item --with-long-double-128
+Specify if @code{long double} type should be 128-bit by default on selected
+GNU/Linux architectures. If using @code{--without-long-double-128},
+@code{long double} will be by default 64-bit, the same as @code{double} type.
+When neither of these configure options are used, the default will be
+128-bit @code{long double} when built against GNU C Library 2.4 and later,
+64-bit @code{long double} otherwise.
+
@end table
@subheading Cross-Compiler-Specific Options