[PATCH, committed] Fix PowerPC long double bootstrap

David Edelsohn dje@watson.ibm.com
Thu Jan 18 23:56:00 GMT 2007


	My recent patch to implement software floating point emulation for
long double 128 caused a build failure when not configured for 128 bit
long double type size.  The emulation support requires TFmode, but GCC
does not appear to provide that without LONG_DOUBLE_TYPE_SIZE 128, despite
FLOAT_MODE TF defined in rs6000-modes.def.

	This patch cloaks the new software emulation part of the
darwin-ldouble.c file if not compiled in long double 128 mode.  I
considered always building the file with -mlong-double-128, but if the
rest of the compiler was not configured for long double 128 and configure
did not automatically detect support, this likely will lead to problems,
so better to nip it in the bud.

Bootstrapped tested on powerpc64-linux.

David


	* config/rs6000/darwin-ldouble.c: Only build _SOFT_FLOAT if
	configured for long double 128.

Index: darwin-ldouble.c
===================================================================
--- darwin-ldouble.c	(revision 120845)
+++ darwin-ldouble.c	(working copy)
@@ -219,7 +219,7 @@
   return z.ldval;
 }
 
-#ifdef _SOFT_FLOAT
+#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__)
 
 long double __gcc_qneg (double, double);
 int __gcc_qeq (double, double, double, double);



More information about the Gcc-patches mailing list