This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: gdb fails to build
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>, <gdb-patches at sourceware dot org>
- Date: Fri, 27 Nov 2015 10:49:26 -0500
- Subject: Re: gdb fails to build
- Authentication-results: sourceware.org; auth=none
- References: <20151127133145 dot GA26571 at physik dot fu-berlin dot de>
On 15-11-27 08:31 AM, Tobias Burnus wrote:
> Hello all,
>
> today, I fail to build gdb using GCC 6; looking at the changes, the culprit
> seems to be this patch set. (I don't know whether it caused the issue or
> just revealed it.) In any case, using yesterday's GDB with yesterday's GCC
> worked.
>
> The error I see is for remove.c - using stddef.h via common-defs.h:
>
> gcc -g -O2 -I. -I../../gdb -I../../gdb/common -I../../gdb/config -DLOCALEDIR="\"gdb/gdb-inst/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode -I../../gdb/../opcodes/.. -I../../gdb/../readline/.. -I../../gdb/../zlib -I../bfd -I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber -I../../gdb/../libdecnumber -I../../gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1 -Ipython/python/include/python2.7 -Ipython/python/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wpointer-sign -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral -Werror -c -o remote.o -MT remote.o -MMD -MP -MF .deps/remote.Tpo ../../gdb/remote.c
>
> In file included from build-gnulib/import/stdio.h:53:0,
> from ../../gdb/common/common-defs.h:31,
> from ../../gdb/defs.h:28,
> from ../../gdb/remote.c:22:
> build-gnulib/import/stddef.h:104:3: error: conflicting types for âmax_align_tâ
> } max_align_t;
> ^
>
> In file included from build-gnulib/import/stddef.h:55:0,
> from build-gnulib/import/stdio.h:53,
> from ../../gdb/common/common-defs.h:31,
> from ../../gdb/defs.h:28,
> from ../../gdb/remote.c:22:
> gcc/gcc-trunk/lib/gcc/x86_64-pc-linux-gnu/6.0.0/include/stddef.h:429:3: note: previous declaration of âmax_align_tâ was here
> } max_align_t;
> ^
>
>
> The definitions are as follows. GCC 6:
>
> typedef struct {
> long long __max_align_ll __attribute__((__aligned__(__alignof__(long long))));
> long double __max_align_ld __attribute__((__aligned__(__alignof__(long double))));
> } max_align_t;
>
>
>
> GDB's build-gnulib:
>
> typedef union
> {
> char *__p _GL_STDDEF_ALIGNAS (char *);
> double __d _GL_STDDEF_ALIGNAS (double);
> long double __ld _GL_STDDEF_ALIGNAS (long double);
> long int __i _GL_STDDEF_ALIGNAS (long int);
> } max_align_t;
>
>
> Cheers,
>
> Tobias
I am trying to build gcc from the tree to see if I can reproduce the failure. However,
I really can't see how this patch could cause this kind of failure... We'll see.