This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Trouble compiling gdb for host=i686 target=mips
- To: gdb-patches at sources dot redhat dot com
- Subject: Trouble compiling gdb for host=i686 target=mips
- From: Curtis Veit <curtisv at lineo dot com>
- Date: Mon, 31 Jul 2000 12:15:03 -0600
- Organization: Lineo Inc.
Hello,
I am going to be doing a bit of work in the near future with gdb (remote
debug for
various targets. mips, ppc, sh, and arm) so I hope in future I might
actually do
something helpful, for today though I'm afraid that this is mainly a
request for help.
I've been trying to figure this out for a couple days now and find I am
lost!
I seem to be having trouble compiling gdb-5.0 configured for
--host=i686-pc-linux-gnu
and
--target=mipsel-elf-linux
I am running on an AMD K7 box.
I am using stock gdb-5.0 with the mips patches by Maciej W. Rozycki from
the gdb-patches mailing list.
(also available from 'http://www.ds2.pg.gda.pl/~macro/gdb-5.0/'.)
I am running OpenLinux 2.3 with some updates and gcc is version
egcs-2.91.66 19990314 (egcs-1.1.2 release)
My goal is to be able to remote debug an MIPS based development board
from IDT.
With both gdbserver and gdbstubs.
I did:
./configure --target=mipsel-elf-linux
make
And got the following errors:
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include
-I./../intl -I../intl -W -Wall -g -O2 -c stab-syms.c -o stab-syms.o
echo timestamp > stab-syms.lo
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.
-D_GNU_SOURCE -I. -I. -I./../include -I./../intl -I../intl -W
-Wall -g -O2 -c elf32-mips.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include
-I./../intl -I../intl -W -Wall -g -O2 -c elf32-mips.c -o elf32-mips.o
elf32-mips.c:1927: `BFD_RELOC_MIPS_HIGHER' undeclared here (not in a
function)
elf32-mips.c:1927: initializer element for
`mips_reloc_map[21].bfd_reloc_val' is not constant
elf32-mips.c:1928: `BFD_RELOC_MIPS_HIGHEST' undeclared here (not in a
function)
elf32-mips.c:1928: initializer element for
`mips_reloc_map[22].bfd_reloc_val' is not constant
make[3]: *** [elf32-mips.lo] Error 1
make[3]: Leaving directory `/.ws/home/curtisv/gdb-5+/bfd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/.ws/home/curtisv/gdb-5+/bfd'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/.ws/home/curtisv/gdb-5+/bfd'
make: *** [all-bfd] Error 2
I couldn't see anything wrong with the code in elf32-mips.c
(I guess I could have missed something here.)
Looking around for these declarations I find (in reloc.c)
ENUM
BFD_RELOC_MIPS_LITERAL
ENUMDOC
Relocation against a MIPS literal section.
ENUM
BFD_RELOC_MIPS_GOT16
ENUMX
BFD_RELOC_MIPS_CALL16
ENUMEQX
BFD_RELOC_MIPS_GPREL32
BFD_RELOC_GPREL32
ENUMX
BFD_RELOC_MIPS_GOT_HI16
ENUMX
BFD_RELOC_MIPS_GOT_LO16
ENUMX
BFD_RELOC_MIPS_CALL_HI16
ENUMX
BFD_RELOC_MIPS_CALL_LO16
ENUMX
BFD_RELOC_MIPS_SUB
ENUMX
BFD_RELOC_MIPS_GOT_PAGE
ENUMX
BFD_RELOC_MIPS_GOT_OFST
ENUMX
BFD_RELOC_MIPS_GOT_DISP
ENUMX
BFD_RELOC_MIPS_HIGHER
ENUMX
BFD_RELOC_MIPS_HIGHEST
COMMENT
ENUMDOC
I have not yet figured out where ENUM, ENUMX, and friends are provided
or what they mean (although I can guess, I can't see the code) my greps
have
not provided any real insight. I'm feeling rather blind...
Does anyone know what is going on or where I should look?
Regards,
Curtis Veit
curtisv@lineo.com