This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR target/6540
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>, "David S. Miller" <davem at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 2 May 2002 19:59:48 +0200
- Subject: [PATCH] Fix PR target/6540
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
I couldn't find the start of "solaris2 float.h/limits.h conflict"
threads from early 1999 which would explain why exactly float_format=none
was used, but definitely using float_format=sparc instead of it on Solaris
is very wrong, since it has 128-bit long double even in 32-bit ABI.
And if float_format=sparc works on Solaris -m64, then float_format=i128
surely will (since the files are the same for 64-bit; and should work in
-m32 too).
While at it, I noticed float-sparc.h is wrong if -mlong-double-128 is used
on sparc-linux.
2002-05-02 Jakub Jelinek <jakub@redhat.com>
PR target/6540
* config.gcc (sparc*-*-solaris2*): Set float_format to i128.
* config/float-sparc.h: Assume 128-bit long double if
__LONG_DOUBLE_128__ is defined.
--- gcc/config/float-sparc.h.jj Thu Oct 11 19:59:58 2001
+++ gcc/config/float-sparc.h Thu May 2 20:06:55 2002
@@ -66,7 +66,7 @@
#undef DBL_MAX_10_EXP
#define DBL_MAX_10_EXP 308
-#if defined(__sparcv9) || defined(__arch64__)
+#if defined(__sparcv9) || defined(__arch64__) || defined(__LONG_DOUBLE_128__)
/* Number of base-FLT_RADIX digits in the significand of a long double */
#undef LDBL_MANT_DIG
--- gcc/config.gcc.jj Thu May 2 12:12:01 2002
+++ gcc/config.gcc Thu May 2 20:02:56 2002
@@ -3173,7 +3173,7 @@ sparc64-*-solaris2* | sparcv9-*-solaris2
tmake_file="$tmake_file t-slibgcc-sld"
fi
extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
- float_format=sparc
+ float_format=i128
if test x${enable_threads} = x ; then
enable_threads=$have_pthread_h
if test x${enable_threads} = x ; then
@@ -3199,14 +3199,7 @@ sparc-hal-solaris2*)
tmake_file="$tmake_file t-slibgcc-sld"
fi
extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
- case $machine in
- *-*-solaris2.[0-4])
- float_format=i128
- ;;
- *)
- float_format=sparc
- ;;
- esac
+ float_format=i128
thread_file='solaris'
;;
sparc-*-solaris2*)
@@ -3241,14 +3234,7 @@ sparc-*-solaris2*)
esac
xm_defines=POSIX
extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
- case $machine in
- *-*-solaris2.[0-4])
- float_format=i128
- ;;
- *)
- float_format=sparc
- ;;
- esac
+ float_format=i128
if test x${enable_threads} = x; then
enable_threads=$have_pthread_h
if test x${enable_threads} = x; then
Jakub