packages/glibc/glibc_2.5.bb : Add a new patch for the powerpc targets with softfloat
authorStelios Koroneos <skoroneos@digital-opsis.com>
Tue, 20 Nov 2007 06:24:05 +0000 (06:24 +0000)
committerStelios Koroneos <skoroneos@digital-opsis.com>
Tue, 20 Nov 2007 06:24:05 +0000 (06:24 +0000)
support that handles a case of strong alias for two (soft) float point functions.
Original patch provided by Hiroki Kaminaga kaminaga at sm dot sony dot co dot jp

packages/glibc/files/glibc-2.5-soft-fp-separate-strong-alias.patch [new file with mode: 0755]
packages/glibc/glibc_2.5.bb

diff --git a/packages/glibc/files/glibc-2.5-soft-fp-separate-strong-alias.patch b/packages/glibc/files/glibc-2.5-soft-fp-separate-strong-alias.patch
new file mode 100755 (executable)
index 0000000..e41c1b7
--- /dev/null
@@ -0,0 +1,205 @@
+Index: glibc-2.5-tls-ppc-04/soft-fp/eqdf2.c\r
+===================================================================\r
+--- glibc-2.5-tls-ppc-04.orig/soft-fp/eqdf2.c\r
++++ glibc-2.5-tls-ppc-04/soft-fp/eqdf2.c\r
+@@ -48,4 +48,3 @@ int __eqdf2(DFtype a, DFtype b)\r
+   return r;\r
+ }\r
\r
+-strong_alias(__eqdf2, __nedf2);\r
+Index: glibc-2.5-tls-ppc-04/soft-fp/gedf2.c\r
+===================================================================\r
+--- glibc-2.5-tls-ppc-04.orig/soft-fp/gedf2.c\r
++++ glibc-2.5-tls-ppc-04/soft-fp/gedf2.c\r
+@@ -47,5 +47,3 @@ int __gedf2(DFtype a, DFtype b)\r
\r
+   return r;\r
+ }\r
+-\r
+-strong_alias(__gedf2, __gtdf2);\r
+Index: glibc-2.5-tls-ppc-04/soft-fp/gtdf2.c\r
+===================================================================\r
+--- /dev/null\r
++++ glibc-2.5-tls-ppc-04/soft-fp/gtdf2.c\r
+@@ -0,0 +1,49 @@\r
++/* Software floating-point emulation.\r
++   Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b\r
++   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.\r
++   This file is part of the GNU C Library.\r
++   Contributed by Richard Henderson (rth@cygnus.com) and\r
++                Jakub Jelinek (jj@ultra.linux.cz).\r
++\r
++   The GNU C Library is free software; you can redistribute it and/or\r
++   modify it under the terms of the GNU Lesser General Public\r
++   License as published by the Free Software Foundation; either\r
++   version 2.1 of the License, or (at your option) any later version.\r
++\r
++   In addition to the permissions in the GNU Lesser General Public\r
++   License, the Free Software Foundation gives you unlimited\r
++   permission to link the compiled version of this file into\r
++   combinations with other programs, and to distribute those\r
++   combinations without any restriction coming from the use of this\r
++   file.  (The Lesser General Public License restrictions do apply in\r
++   other respects; for example, they cover modification of the file,\r
++   and distribution when not linked into a combine executable.)\r
++\r
++   The GNU C Library is distributed in the hope that it will be useful,\r
++   but WITHOUT ANY WARRANTY; without even the implied warranty of\r
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
++   Lesser General Public License for more details.\r
++\r
++   You should have received a copy of the GNU Lesser General Public\r
++   License along with the GNU C Library; if not, write to the Free\r
++   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,\r
++   MA 02110-1301, USA.  */\r
++\r
++#include "soft-fp.h"\r
++#include "double.h"\r
++\r
++int __gtdf2(DFtype a, DFtype b)\r
++{\r
++  FP_DECL_EX;\r
++  FP_DECL_D(A); FP_DECL_D(B);\r
++  int r;\r
++\r
++  FP_UNPACK_RAW_D(A, a);\r
++  FP_UNPACK_RAW_D(B, b);\r
++  FP_CMP_D(r, A, B, -2);\r
++  if (r == -2 && (FP_ISSIGNAN_D(A) || FP_ISSIGNAN_D(B)))\r
++    FP_SET_EXCEPTION(FP_EX_INVALID);\r
++  FP_HANDLE_EXCEPTIONS;\r
++\r
++  return r;\r
++}\r
+Index: glibc-2.5-tls-ppc-04/soft-fp/ledf2.c\r
+===================================================================\r
+--- glibc-2.5-tls-ppc-04.orig/soft-fp/ledf2.c\r
++++ glibc-2.5-tls-ppc-04/soft-fp/ledf2.c\r
+@@ -48,4 +48,3 @@ int __ledf2(DFtype a, DFtype b)\r
+   return r;\r
+ }\r
\r
+-strong_alias(__ledf2, __ltdf2);\r
+Index: glibc-2.5-tls-ppc-04/soft-fp/ltdf2.c\r
+===================================================================\r
+--- /dev/null\r
++++ glibc-2.5-tls-ppc-04/soft-fp/ltdf2.c\r
+@@ -0,0 +1,49 @@\r
++/* Software floating-point emulation.\r
++   Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b\r
++   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.\r
++   This file is part of the GNU C Library.\r
++   Contributed by Richard Henderson (rth@cygnus.com) and\r
++                Jakub Jelinek (jj@ultra.linux.cz).\r
++\r
++   The GNU C Library is free software; you can redistribute it and/or\r
++   modify it under the terms of the GNU Lesser General Public\r
++   License as published by the Free Software Foundation; either\r
++   version 2.1 of the License, or (at your option) any later version.\r
++\r
++   In addition to the permissions in the GNU Lesser General Public\r
++   License, the Free Software Foundation gives you unlimited\r
++   permission to link the compiled version of this file into\r
++   combinations with other programs, and to distribute those\r
++   combinations without any restriction coming from the use of this\r
++   file.  (The Lesser General Public License restrictions do apply in\r
++   other respects; for example, they cover modification of the file,\r
++   and distribution when not linked into a combine executable.)\r
++\r
++   The GNU C Library is distributed in the hope that it will be useful,\r
++   but WITHOUT ANY WARRANTY; without even the implied warranty of\r
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
++   Lesser General Public License for more details.\r
++\r
++   You should have received a copy of the GNU Lesser General Public\r
++   License along with the GNU C Library; if not, write to the Free\r
++   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,\r
++   MA 02110-1301, USA.  */\r
++\r
++#include "soft-fp.h"\r
++#include "double.h"\r
++\r
++int __ltdf2(DFtype a, DFtype b)\r
++{\r
++  FP_DECL_EX;\r
++  FP_DECL_D(A); FP_DECL_D(B);\r
++  int r;\r
++\r
++  FP_UNPACK_RAW_D(A, a);\r
++  FP_UNPACK_RAW_D(B, b);\r
++  FP_CMP_D(r, A, B, 2);\r
++  if (r == 2 && (FP_ISSIGNAN_D(A) || FP_ISSIGNAN_D(B)))\r
++    FP_SET_EXCEPTION(FP_EX_INVALID);\r
++  FP_HANDLE_EXCEPTIONS;\r
++\r
++  return r;\r
++}\r
+Index: glibc-2.5-tls-ppc-04/soft-fp/nedf2.c\r
+===================================================================\r
+--- /dev/null\r
++++ glibc-2.5-tls-ppc-04/soft-fp/nedf2.c\r
+@@ -0,0 +1,49 @@\r
++/* Software floating-point emulation.\r
++   Return 0 iff a == b, 1 otherwise\r
++   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.\r
++   This file is part of the GNU C Library.\r
++   Contributed by Richard Henderson (rth@cygnus.com) and\r
++                Jakub Jelinek (jj@ultra.linux.cz).\r
++\r
++   The GNU C Library is free software; you can redistribute it and/or\r
++   modify it under the terms of the GNU Lesser General Public\r
++   License as published by the Free Software Foundation; either\r
++   version 2.1 of the License, or (at your option) any later version.\r
++\r
++   In addition to the permissions in the GNU Lesser General Public\r
++   License, the Free Software Foundation gives you unlimited\r
++   permission to link the compiled version of this file into\r
++   combinations with other programs, and to distribute those\r
++   combinations without any restriction coming from the use of this\r
++   file.  (The Lesser General Public License restrictions do apply in\r
++   other respects; for example, they cover modification of the file,\r
++   and distribution when not linked into a combine executable.)\r
++\r
++   The GNU C Library is distributed in the hope that it will be useful,\r
++   but WITHOUT ANY WARRANTY; without even the implied warranty of\r
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
++   Lesser General Public License for more details.\r
++\r
++   You should have received a copy of the GNU Lesser General Public\r
++   License along with the GNU C Library; if not, write to the Free\r
++   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,\r
++   MA 02110-1301, USA.  */\r
++\r
++#include "soft-fp.h"\r
++#include "double.h"\r
++\r
++int __nedf2(DFtype a, DFtype b)\r
++{\r
++  FP_DECL_EX;\r
++  FP_DECL_D(A); FP_DECL_D(B);\r
++  int r;\r
++\r
++  FP_UNPACK_RAW_D(A, a);\r
++  FP_UNPACK_RAW_D(B, b);\r
++  FP_CMP_EQ_D(r, A, B);\r
++  if (r && (FP_ISSIGNAN_D(A) || FP_ISSIGNAN_D(B)))\r
++    FP_SET_EXCEPTION(FP_EX_INVALID);\r
++  FP_HANDLE_EXCEPTIONS;\r
++\r
++  return r;\r
++}\r
+Index: glibc-2.5-tls-ppc-04/soft-fp/Makefile\r
+===================================================================\r
+--- glibc-2.5-tls-ppc-04.orig/soft-fp/Makefile\r
++++ glibc-2.5-tls-ppc-04/soft-fp/Makefile\r
+@@ -27,8 +27,8 @@ gcc-single-routines := negsf2 addsf3 sub\r
+       fixunssfdi floatdisf sqrtsf2 floatunsisf floatundisf \\r
+       fmasf4\r
\r
+-gcc-double-routines := negdf2 adddf3 subdf3 muldf3 divdf3 eqdf2 \\r
+-      ledf2 gedf2 unorddf2 fixdfsi fixunsdfsi floatsidf fixdfdi        \\r
++gcc-double-routines := negdf2 adddf3 subdf3 muldf3 divdf3 eqdf2 nedf2 \\r
++      ledf2 ltdf2 gedf2 gtdf2 unorddf2 fixdfsi fixunsdfsi floatsidf fixdfdi \\r
+       fixunsdfdi floatdidf extendsfdf2 truncdfsf2 sqrtdf2 floatunsidf \\r
+       floatundidf fmadf4\r
\r
index 2ffa6f6..e30d357 100644 (file)
@@ -5,7 +5,7 @@ ARM_INSTRUCTION_SET = "arm"
 PACKAGES_DYNAMIC = "libc6*"
 RPROVIDES_${PN}-dev = "libc6-dev"
 
-PR = "r7"
+PR = "r8"
 
 # the -isystem in bitbake.conf screws up glibc do_stage
 BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
@@ -74,7 +74,8 @@ SRC_URI_append_powerpc= " file://ppc-sfp-machine.patch;patch=1 \
                           file://ppc-soft-fp-20070115.patch;patch=1 \
                           file://ppc-ld-nofpu-20070104.patch;patch=1 \
                           file://ppc-ports-ld-nofpu-20070114.patch;patch=1 \
-                          file://powerpc-sqrt-hack.diff;patch=1""
+                          file://powerpc-sqrt-hack.diff;patch=1 \
+                          file://glibc-2.5-soft-fp-separate-strong-alias.patch;patch=1"
 
 S = "${WORKDIR}/glibc-${PV}"
 B = "${WORKDIR}/build-${TARGET_SYS}"