diff --git a/compat-libstdc++33-ldbl.patch b/compat-libstdc++33-ldbl.patch index 6055c01..a3cd35d 100644 --- a/compat-libstdc++33-ldbl.patch +++ b/compat-libstdc++33-ldbl.patch @@ -1,6 +1,14 @@ --- libstdc++33-v3/libmath/stubs.c.jj 2003-06-03 08:48:02.000000000 -0400 -+++ libstdc++33-v3/libmath/stubs.c 2006-08-21 07:25:18.000000000 -0400 -@@ -30,10 +30,25 @@ ++++ libstdc++33-v3/libmath/stubs.c 2006-08-21 09:18:10.000000000 -0400 +@@ -27,13 +27,33 @@ + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. */ + ++#if defined __s390__ || defined __powerpc__ ++/* Lie. */ ++#define __LONG_DOUBLE_128__ 1 ++#endif ++ #include #include "config.h" @@ -9,7 +17,6 @@ +#undef HAVE_COSHL +#undef HAVE_COSL +#undef HAVE_EXPL -+#undef HAVE_HYPOTL +#undef HAVE_LOG10L +#undef HAVE_LOGL +#undef HAVE_POWL @@ -23,7 +30,20 @@ /* For targets which do not have support for long double versions, we use the crude approximation. We'll do better later. */ -- + #ifndef HAVE_ATAN2F float atan2f(float x, float y) +@@ -137,6 +156,12 @@ hypotl(long double x, long double y) + x /= s; y /= s; + return s * sqrtl(x * x + y * y); + } ++#elif (defined __s390__ || defined __powerpc__) && defined HAVE_HYPOT ++long double ++hypotl(long double x, long double y) ++{ ++ return hypot((double) x, (double) y); ++} + #endif + +