Can't build gdb CVS sources for {sparc64,sparc}-linux, redefinition of structs in reg.h
Christian Jönsson
c.christian.joensson@telia.com
Fri Feb 7 07:25:00 GMT 2003
On Mon, Feb 03, 2003 at 07:32:20AM +0100, Christian Jönsson wrote:
> I've tried to build both gdb-5.3 and gdb cvs trunk for sparc64-linux
> and sparc-linux on Aurora SPARC Linux 1.0 (based on Red Hat Linux 7.X)
> both on sun4u and sun4m respectively:
>
> This was on a Aurora SPARC Linux 1.0 (Ansel) Ultra1 single UltraSparc I
> sun4u system with these packages:
>
> binutils 2.13.90 20030202 sparc64-linux
> bison-1.35-1
> dejagnu-1.4.2-10 (ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS)
> expect-5.32.2-67
> gcc-2.96-113
> glibc-2.2.5-42
> glibc-kernheaders-2.4-7.16sparc
> glibc64-2.2.5-42
> kernel-2.4.19-1.2sparc (from Aurora SPARC Linux 0.42)
> tcl-8.3.3-67
>
> In-tree joined gcc, binutils and gdb cvs trunks.
>
> gcc -m64 -c -g -O2 -I. -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/config -DLOCALEDIR="\"/usr/local/gcc-binutils/share/locale\"" -DHAVE_CONFIG_H -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../include/opcode -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../readline/.. -I../bfd -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../bfd -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../include -I../intl -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../intl -DMI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c
> In file included from /usr/include/asm/reg.h:4,
> from /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:36:
> /usr/include/asm-sparc64/reg.h:49: redefinition of `struct fpu'
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c: In function `fetch_inferior_registers':
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:99: warning: cast from pointer to integer of different size
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:103: warning: implicit declaration of function `memcpy'
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:106: structure has no member named `r_ps'
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:108: structure has no member named `r_pc'
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:110: structure has no member named `r_npc'
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:111: `registers' undeclared (first use in this function)
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:111: (Each undeclared identifier is reported only once
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:111: for each function it appears in.)
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:132: warning: cast from pointer to integer of different size
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c: In function `store_inferior_registers':
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:257: structure has no member named `r_ps'
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:259: structure has no member named `r_pc'
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:261: structure has no member named `r_npc'
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:267: warning: cast from pointer to integer of different size
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:283: warning: cast from pointer to integer of different size
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c: In function `fetch_core_registers':
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:317: structure has no member named `r_ps'
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:318: structure has no member named `r_pc'
> /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:319: structure has no member named `r_npc'
> make[2]: *** [sparc-nat.o] Error 1
There are some suggested patches for sparc64 posted to the list by
David S. Miller around April 2002 concerning shared linux-nat for
example, and, unfortunately to me at least, they seem to not have been
considered.
Might they be revisited by the gdb development community?
Humbly asking...,
/ChJ
More information about the Gdb
mailing list