summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-09-11 16:38:20 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-19 17:56:29 +0100
commit7cab823d21a907565a7f1e71eb824895071c201b (patch)
treedd2ed484ecb4583469c425eba53f4199bf165459 /meta/recipes-core/eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch
parentc98b7e815e001e41b5b5bb8810cc351cd4cb94c0 (diff)
downloadpoky-7cab823d21a907565a7f1e71eb824895071c201b.tar.gz
eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu
(From OE-Core rev: f06097f4581e4c728c2950a86e025384e4bdcdf0) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch')
-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 @@
1Create e5500 specific math_private.h and let it include when compiling for e5500/64bit core
2We prefefine __CPU_HAS_FSQRT to 0 and then in general ppc64 math_private.h we check if its
3already defined before redefining it. This way we can ensure that on e5500 builds it wont
4emit fsqrt intructions
5
6-Khem
7
8Upstream-Status: Pending
9
10Index: libc/sysdeps/powerpc/fpu/math_private.h
11===================================================================
12--- libc.orig/sysdeps/powerpc/fpu/math_private.h 2012-09-03 22:37:58.000000000 -0700
13+++ libc/sysdeps/powerpc/fpu/math_private.h 2012-09-17 09:35:09.709124003 -0700
14@@ -25,10 +25,12 @@
15 #include <dl-procinfo.h>
16 #include_next <math_private.h>
17
18-# if __WORDSIZE == 64 || defined _ARCH_PWR4
19-# define __CPU_HAS_FSQRT 1
20-# else
21-# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
22+# ifndef __CPU_HAS_FSQRT
23+# if __WORDSIZE == 64 || defined _ARCH_PWR4
24+# define __CPU_HAS_FSQRT 1
25+# else
26+# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
27+# endif
28 # endif
29
30 extern double __slow_ieee754_sqrt (double);
31Index: libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
32===================================================================
33--- /dev/null 1970-01-01 00:00:00.000000000 +0000
34+++ libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h 2012-09-17 09:56:59.129124074 -0700
35@@ -0,0 +1,9 @@
36+#ifndef _E5500_MATH_PRIVATE_H_
37+#define _E5500_MATH_PRIVATE_H_ 1
38+/* E5500 core FPU does not implement
39+ fsqrt */
40+
41+#define __CPU_HAS_FSQRT 0
42+#include_next <math_private.h>
43+
44+#endif /* _E5500_MATH_PRIVATE_H_ */