fix gcc 4.2.0 compile for ppc
[openwrt/svn-archive/archive.git] / toolchain / gcc / patches / 4.2.0 / 307-long_double_fix.patch
1 Index: gcc-4.2.0/gcc/config/rs6000/darwin-ldouble.c
2 ===================================================================
3 --- gcc-4.2.0.orig/gcc/config/rs6000/darwin-ldouble.c 2007-06-28 20:56:39.222667344 +0200
4 +++ gcc-4.2.0/gcc/config/rs6000/darwin-ldouble.c 2007-06-28 20:57:02.258165416 +0200
5 @@ -49,9 +49,10 @@
6
7 This code currently assumes big-endian. */
8
9 -#if ((!defined (__NO_FPRS__) || defined (_SOFT_FLOAT)) \
10 +#if (defined (__LONG_DOUBLE_128__) && \
11 + ((!defined (__NO_FPRS__) || defined (_SOFT_FLOAT)) \
12 && !defined (__LITTLE_ENDIAN__) \
13 - && (defined (__MACH__) || defined (__powerpc__) || defined (_AIX)))
14 + && (defined (__MACH__) || defined (__powerpc__) || defined (_AIX))))
15
16 #define fabs(x) __builtin_fabs(x)
17 #define isless(x, y) __builtin_isless (x, y)
18 @@ -219,7 +220,7 @@
19 return z.ldval;
20 }
21
22 -#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__)
23 +#ifdef _SOFT_FLOAT
24
25 long double __gcc_qneg (double, double);
26 int __gcc_qeq (double, double, double, double);