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


Hi,

On Tue, May 21, 2013 at 10:22:12PM +0200, Winfried Magerl wrote:
> Hi,
> 
> On Tue, May 21, 2013 at 04:20:03PM -0300, 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?
> 
> unfortunatly this doesn't help, at least not on x86_64 with:
> 	AMD FX(tm)-6300 Six-Core Processor (fam: 15, model: 02, stepping: 00)
> 	Linux 3.9.3 x86_64 GNU/Linux
> 	gcc (GCC) 4.8.1 20130521 (prerelease) [gcc-4_8-branch revision 199160]
> 	GNU assembler (Linux/GNU Binutils) 2.23.52.0.2.20130423
> 	CFLAGS='-O3'
> 
> # fgrep '***' check.out
> make[2]: *** [/home/winfried/glibc-cvs/winni/csu/tst-atomic.out] Error 139
> make[2]: *** [/home/winfried/glibc-cvs/winni/csu/tst-atomic-long.out] Error 139
> make[2]: *** [/home/winfried/glibc-cvs/winni/csu/test-multiarch.out] Error 139
> [ctrl-C to prevent testsuite from eating all my memory]

Adhemerval explained to me in a private mail that this patch was not
supposed to fix the issue with the loader and suggested the following
patch to me:

diff --git a/sysdeps/x86_64/multiarch/Makefile b/sysdeps/x86_64/multiarch/Makefile
index 203d16e..3ad1b35 100644
--- a/sysdeps/x86_64/multiarch/Makefile
+++ b/sysdeps/x86_64/multiarch/Makefile
@@ -26,6 +26,7 @@ CFLAGS-strstr.c += -msse4
 CFLAGS-strcasestr.c += -msse4
 CFLAGS-strcasestr-nonascii.c += -msse4
 endif
+CFLAGS-rtld-memset.c += -fno-tree-loop-distribute-patterns
 endif

 ifeq ($(subdir),wcsmbs)

This patch fixes compilation with gcc-4.8.x and '-O3' and
remaining testsuite-errors are the same as with '-O2'.

But:

sysdeps/x86_64/rtld-memset.c is only a include for memset.c:
#include <string/memset.c>

and string/memset.c is identical with the glibc-2.17-version:

diff -U 0 glibc-2.1?-branch/string/memset.c
--- glibc-2.17-branch/string/memset.c   2013-04-12 23:05:44.520467413 +0200
+++ glibc-2.18-branch/string/memset.c   2013-04-14 21:02:51.870016692 +0200
@@ -1 +1 @@
-/* Copyright (C) 1991, 1997, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2013 Free Software Foundation, Inc.

And glibc-2.17 has no problem with gcc-4.8.x and '-O3'. Obviously
the above patch fixes the problem but obviously I don't understand
why.

regards

	winfried


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