This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc-4.8 + tree-loop-distribute-patterns breaks glibc-2.18


On 05/21/2013 09:20 PM, Adhemerval Zanella wrote:
On 21-05-2013 05:52, Andreas Jaeger wrote:
My suggestion was to simplify your patch: remove all the configure parts and unconditionally include <string.h> (together with a comment) where needed (as in your patch).

Wouldn't that work?

Andreas

For the check-localplt case I think it is suffice, but I'm not sure if it will be the
case for string algorithms in the loader (I'll check it). I did the configure part
mostly to be prepared fr such cases where include <string.h> is not enough.

Based on your comments, I propose the following patch to fix the check-localplt issues
I observed with GCC 4.8 and GCC trunk on PPC32 and PPC64. I tested with default 4.8
from gcc site and also with today gcc trunk on both PPC32 and PCP64.

Any comments?

This patch looks fine to me,
Andreas

---

2013-05-21  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>

	* stdlib/divrem.c: Include <string.h> to avoid string function PLT
	call from loop transformation.
	* stdlib/mul.c: Likewise.
	* stdlib/mul_n.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: Likewise.
	* wcsmbs/wcpncpy.c: Likewise.
	* wcsmbs/wcsncpy.c: Likewise.

--

diff --git a/stdlib/divrem.c b/stdlib/divrem.c
index 99c782e..d15e72e 100644
--- a/stdlib/divrem.c
+++ b/stdlib/divrem.c
@@ -19,6 +19,7 @@ You should have received a copy of the GNU Lesser General Public License
  along with the GNU MP Library; see the file COPYING.LIB.  If not, see
  <http://www.gnu.org/licenses/>.  */

+#include <string.h>  /* memmove/memset prototypes to avoid PLT calls.  */
  #include <gmp.h>
  #include "gmp-impl.h"
  #include "longlong.h"
diff --git a/stdlib/mul.c b/stdlib/mul.c
index 1258717..d1c8d54 100644
--- a/stdlib/mul.c
+++ b/stdlib/mul.c
@@ -18,6 +18,7 @@ You should have received a copy of the GNU Lesser General Public License
  along with the GNU MP Library; see the file COPYING.LIB.  If not, see
  <http://www.gnu.org/licenses/>.  */

+#include <string.h>  /* memmove/memset prototypes to avoid PLT calls.  */
  #include <gmp.h>
  #include "gmp-impl.h"

diff --git a/stdlib/mul_n.c b/stdlib/mul_n.c
index f0a9a30..998cd0b 100644
--- a/stdlib/mul_n.c
+++ b/stdlib/mul_n.c
@@ -18,6 +18,7 @@ You should have received a copy of the GNU Lesser General Public License
  along with the GNU MP Library; see the file COPYING.LIB.  If not, see
  <http://www.gnu.org/licenses/>.  */

+#include <string.h>  /* memmove/memset prototypes to avoid PLT calls.  */
  #include <gmp.h>
  #include "gmp-impl.h"

diff --git a/sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c b/sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c
index 00e44b8..030c704 100644
--- a/sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c
+++ b/sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c
@@ -22,6 +22,7 @@
  #include <float.h>
  #include <math.h>
  #include <stdlib.h>
+#include <string.h>  /* memmove/memset prototypes to avoid PLT calls.  */

  /* Convert a `long double' in IBM extended format to a multi-precision
     integer representing the significand scaled up by its number of
diff --git a/wcsmbs/wcpncpy.c b/wcsmbs/wcpncpy.c
index 634d335..06860a8 100644
--- a/wcsmbs/wcpncpy.c
+++ b/wcsmbs/wcpncpy.c
@@ -16,6 +16,7 @@
     License along with the GNU C Library; if not, see
     <http://www.gnu.org/licenses/>.  */

+#include <string.h>  /* memmove/memset prototypes to avoid PLT calls.  */
  #include <wchar.h>


diff --git a/wcsmbs/wcsncpy.c b/wcsmbs/wcsncpy.c
index a88f8fc..e804380 100644
--- a/wcsmbs/wcsncpy.c
+++ b/wcsmbs/wcsncpy.c
@@ -16,6 +16,7 @@
     License along with the GNU C Library; if not, see
     <http://www.gnu.org/licenses/>.  */

+#include <string.h>  /* memmove/memset prototypes to avoid PLT calls.  */
  #include <wchar.h>




--
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]