This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Latest GCC fails to build glibc
- From: Richard Biener <rguenther at suse dot de>
- To: Ondřej Bílka <neleai at seznam dot cz>
- Cc: Steve Ellcey <sellcey at imgtec dot com>, libc-alpha at sourceware dot org
- Date: Mon, 18 May 2015 09:35:03 +0200 (CEST)
- Subject: Re: Latest GCC fails to build glibc
- Authentication-results: sourceware.org; auth=none
- References: <24211622-19d7-4514-be3c-337c241188d2 at BAMAIL02 dot ba dot imgtec dot org> <20150515124816 dot GA22601 at domone>
On Fri, 15 May 2015, Ondřej Bílka wrote:
> On Thu, May 14, 2015 at 01:59:16PM -0700, Steve Ellcey wrote:
> > A recent change to GCC (Fix to PR middle-end/66110) has caused glibc to
> > fail to build. When compiling the latest glibc with the latest GCC I
> > get the error below. I don't know if this is a GCC problem or a glibc
> > problem. I notice that when Richard checked this in he also added the
> > use of -Wno-strict-aliasing to the compilation of one of the GCC files.
> > Maybe we need the same thing when compiling memstream.c?
> >
> Its glibc one. since we added -Werror these issues come from time to
> time when gcc improves/adds warning detection.
>
> Typically you add pragma to disable these.
Looks like a genuine bug in glibc though - what is the type of
new_f->fp._sf._sbf? You are accessing it as struct _IO_FILE_plus.
Eventually the fix is to make _sfb a union.
And yes, I didn't fix the genuine bug in dfp.c either...
Richard.
>
>
> > Steve Ellcey
> > sellcey@imgtec.com
> >
> >
> > In file included from memstream.c:18:0:
> > memstream.c: In function 'open_memstream':
> > memstream.c:92:22: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
> > _IO_JUMPS ((struct _IO_FILE_plus *) &new_f->fp._sf._sbf) = &_IO_mem_jumps;
> > ^
> > libioP.h:107:26: note: in definition of macro '_IO_JUMPS'
> > #define _IO_JUMPS(THIS) (THIS)->vtable
> > ^
> > cc1: all warnings being treated as errors
> > make[2]: *** [/scratch/sellcey/repos/test_deja/obj-mips-mti-linux-gnu/glibc/obj_default/libio/memstream.o] Error 1
> >
> > Steve Ellcey
> > sellcey@imgtec.com
>
>
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nuernberg)