aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-2.16
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-09-11 16:38:20 -0700
committerSaul Wold <sgw@linux.intel.com>2012-09-18 07:44:13 -0700
commitf06097f4581e4c728c2950a86e025384e4bdcdf0 (patch)
tree1689bf6bcb97d0fb8868701a873e15caaf489b6e /meta/recipes-core/eglibc/eglibc-2.16
parent76f3a1979ea166238e26a2569fb06a4a403bd864 (diff)
downloadopenembedded-core-contrib-f06097f4581e4c728c2950a86e025384e4bdcdf0.tar.gz
eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-2.16')
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch b/meta/recipes-core/eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch
new file mode 100644
index 0000000000..712b3538e8
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch
@@ -0,0 +1,44 @@
+Create e5500 specific math_private.h and let it include when compiling for e5500/64bit core
+We prefefine __CPU_HAS_FSQRT to 0 and then in general ppc64 math_private.h we check if its
+already defined before redefining it. This way we can ensure that on e5500 builds it wont
+emit fsqrt intructions
+
+-Khem
+
+Upstream-Status: Pending
+
+Index: libc/sysdeps/powerpc/fpu/math_private.h
+===================================================================
+--- libc.orig/sysdeps/powerpc/fpu/math_private.h 2012-09-03 22:37:58.000000000 -0700
++++ libc/sysdeps/powerpc/fpu/math_private.h 2012-09-17 09:35:09.709124003 -0700
+@@ -25,10 +25,12 @@
+ #include <dl-procinfo.h>
+ #include_next <math_private.h>
+
+-# if __WORDSIZE == 64 || defined _ARCH_PWR4
+-# define __CPU_HAS_FSQRT 1
+-# else
+-# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
++# ifndef __CPU_HAS_FSQRT
++# if __WORDSIZE == 64 || defined _ARCH_PWR4
++# define __CPU_HAS_FSQRT 1
++# else
++# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
++# endif
+ # endif
+
+ extern double __slow_ieee754_sqrt (double);
+Index: libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h 2012-09-17 09:56:59.129124074 -0700
+@@ -0,0 +1,9 @@
++#ifndef _E5500_MATH_PRIVATE_H_
++#define _E5500_MATH_PRIVATE_H_ 1
++/* E5500 core FPU does not implement
++ fsqrt */
++
++#define __CPU_HAS_FSQRT 0
++#include_next <math_private.h>
++
++#endif /* _E5500_MATH_PRIVATE_H_ */