This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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: build/955: build failure with GDB-5.3: sparc-nat.c structure redefinition errors with sparc64-linux, glibc-2.2.x


On Sat, 10 May 2003, Christian Joensson muttered drunkenly:
> On Sat, May 10, 2003 at 09:57:12AM +0200, Christian Joensson wrote:
>> On Sun, Apr 27, 2003 at 11:33:21AM -0400, Daniel Jacobowitz wrote:
>> > On Sun, Apr 27, 2003 at 03:08:00PM -0000, Nix wrote:
>> > > The following reply was made to PR build/955; it has been noted by GNATS.
>> > > 
>> > > From: Nix <nix@esperi.demon.co.uk>
>> > > To: Christian =?iso-8859-1?q?J=F6nsson?= <c.christian.joensson@telia.com>
>> > > Cc: <nobody@sources.redhat.com>, <gdb-gnats@sources.redhat.com>,
>> > >    <gdb-prs@sources.redhat.com>, <aurora-sparc-devel@linuxpower.org>
>> > > Subject: Re: build/955: build failure with GDB-5.3: sparc-nat.c structure redefinition errors with sparc64-linux, glibc-2.2.x
>> > > Date: 27 Apr 2003 15:45:01 +0100
>> > > 
>> > >  On Sun, 27 Apr 2003, Christian Jönsson spake:
>> > >  > http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&databas
>> > >  > e=gdb&pr=955
>> > >  > 
>> > >  > Is *anything* happening on this issue in gdb cvs HEAD?
>> > >  
>> > >  My apologies for not following up; this patch, abstracted from Debian
>> > >  (where fading memory tells me it is due to Daniel Jacobowitz), fixes it,
>> > >  but is probably too ugly to go in; the incompatibility test should
>> > >  really be done by configure:
>> > 
>> > Right on the origin and ugliness counts, which is why I never got
>> > around to doing anything about it.  But it's better than nothing, since
>> > it lets sparc-linux build, so I suppose it should go in... does anyone object?
>> >   
>> > >  Index: gdb/gdb/sparc-nat.c
>> > >  ===================================================================
>> > >  RCS file: /cvs/src/src/gdb/sparc-nat.c,v
>> > >  retrieving revision 1.13.12.1
>> > >  diff -u -r1.13.12.1 sparc-nat.c
>> > >  --- gdb/gdb/sparc-nat.c	3 Dec 2002 22:35:49 -0000	1.13.12.1
>> > >  +++ gdb/gdb/sparc-nat.c	27 Apr 2003 14:39:53 -0000
>> > >  @@ -33,6 +33,13 @@
>> > >   #include <sys/ptrace.h>
>> > >   #include <sys/wait.h>
>> > >   #ifdef __linux__
>> > >  +/* Sadly, <sys/ucontext.h> conflicts with <asm/reg.h> on Linux.  And
>> > >  +   -D_GNU_SOURCE brings in <sys/ucontext.h> implicitly with <signal.h>.
>> > >  +   Hack around this.  */
>> > >  +#undef FPU_REGS_TYPE
>> > >  +#define fpu asm_reg_fpu
>> > >  +#define fq asm_reg_fq
>> > >  +#define fpq asm_reg_fpq
>> > >   #include <asm/reg.h>
>> > >   #else
>> > >   #include <machine/reg.h>
>> > >  
>> > >  
>> > >  -- 
>> > >  `It is an unfortunate coincidence that the date locarchive.h was
>> > >   written (in hex) matches Ritchie's birthday (in octal).'
>> > >                 -- Roland McGrath on the libc-alpha list
>> > > 
>> > 
>> > -- 
>> > Daniel Jacobowitz
>> > MontaVista Software                         Debian GNU/Linux Developer
>> 
>> ping... how's it going?
>> 
> 
> I just thougt I'd test your suggested patch... it still fails...
> 
> This is how the compile stops with error in the current gdb cvs HEAD:
> 
> gcc -c -g -O2    -I. -I/home/chj/src/gdb -I/home/chj/src/gdb/config -DLOCALEDIR="\"/usr/local/gcc-binutils/share/locale\"" -DHAVE_CONFIG_H -I/home/chj/src/gdb/../include/opcode -I/home/chj/src/gdb/../readline/.. -I../bfd -I/home/chj/src/gdb/../bfd  -I/home/chj/src/gdb/../include -I../intl -I/home/chj/src/gdb/../intl  -DMI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized  /home/chj/src/gdb/sparc-nat.c
> In file included from /usr/include/asm/reg.h:4,
>                  from /home/chj/src/gdb/sparc-nat.c:36:
> /usr/include/asm-sparc64/reg.h:49: error: redefinition of `struct fpu'
> /home/chj/src/gdb/sparc-nat.c: In function `fetch_inferior_registers':
> /home/chj/src/gdb/sparc-nat.c:99: warning: cast from pointer to integer of different size
> /home/chj/src/gdb/sparc-nat.c:103: warning: implicit declaration of function `memcpy'

Oh. How strange, it workedforme.

I'll see if I can reproduce & fix it tomorrow (assuming Daniel doesn't
get to it before that).

-- 
`It is an unfortunate coincidence that the date locarchive.h was
 written (in hex) matches Ritchie's birthday (in octal).'
               -- Roland McGrath on the libc-alpha list


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