ce426f
Combination of the following two commits:
ce426f
ce426f
From 45045c44fabde9152ab1a0b4ed06419a3621f535 Mon Sep 17 00:00:00 2001
ce426f
From: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
ce426f
Date: Thu, 21 Mar 2013 14:15:45 -0300
ce426f
Subject: [PATCH 20/42] PowerPC: fix sqrtl ABI issue
ce426f
ce426f
This patch fixes a sqrtl ABI issue when building for powerpc64.
ce426f
(cherry picked from commit b5784d95bb94eda59b08aca735406908e209f638)
ce426f
ce426f
From dad835a11f370afd2dae4bac554fa64fac5a8c6e Mon Sep 17 00:00:00 2001
ce426f
From: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
ce426f
Date: Tue, 26 Mar 2013 10:01:57 -0300
ce426f
Subject: [PATCH 21/42] PowerPC: fix libm ABI issue for llroundl (cherry
ce426f
 picked from commit
ce426f
 fce14d4e9c6e08ad8c825fe88d8cbdac5c739565)
ce426f
ce426f
diff -pruN glibc-2.17-c758a686/sysdeps/powerpc/fpu/s_llround.c glibc-2.17-c758a686/sysdeps/powerpc/fpu/s_llround.c
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/fpu/s_llround.c	2012-12-25 08:32:13.000000000 +0530
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/fpu/s_llround.c	2013-08-06 17:45:56.719534470 +0530
ce426f
@@ -17,6 +17,7 @@
ce426f
    <http://www.gnu.org/licenses/>.  */
ce426f
 
ce426f
 #include <math.h>
ce426f
+#include <math_ldbl_opt.h>
ce426f
 
ce426f
 /* I think that what this routine is supposed to do is round a value
ce426f
    to the nearest integer, with values exactly on the boundary rounded
ce426f
@@ -47,3 +48,6 @@ weak_alias (__llround, llround)
ce426f
 strong_alias (__llround, __llroundl)
ce426f
 weak_alias (__llround, llroundl)
ce426f
 #endif
ce426f
+#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)
ce426f
+compat_symbol (libm, __llround, llroundl, GLIBC_2_1);
ce426f
+#endif
ce426f
diff -pruN glibc-2.17-c758a686/sysdeps/powerpc/fpu/w_sqrt.c glibc-2.17-c758a686/sysdeps/powerpc/fpu/w_sqrt.c
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/fpu/w_sqrt.c	2012-12-25 08:32:13.000000000 +0530
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/fpu/w_sqrt.c	2013-08-06 17:45:53.459534613 +0530
ce426f
@@ -19,6 +19,7 @@
ce426f
 #include <math.h>
ce426f
 #include <math_private.h>
ce426f
 #include <fenv_libc.h>
ce426f
+#include <math_ldbl_opt.h>
ce426f
 
ce426f
 double
ce426f
 __sqrt (double x)		/* wrapper sqrt */
ce426f
@@ -42,3 +43,6 @@ weak_alias (__sqrt, sqrt)
ce426f
 #ifdef NO_LONG_DOUBLE
ce426f
   strong_alias (__sqrt, __sqrtl) weak_alias (__sqrt, sqrtl)
ce426f
 #endif
ce426f
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
ce426f
+compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0);
ce426f
+#endif