Problem building GDB for sparc-rtems

David Paterson
2011-05-16T16:35:11Z

Hi,

This may be more appropriate for the RTEMS, or even Binutils, mailing
lists - if so, please
let me know and I'll move it over.

I'm trying to build a cross-toolchain for a Sparc (Leon2) system, and
while the basic
version, configured for "sparc-elf" is no problem, when I try to
rebuild for RTEMS I'm
getting an error during the GDB build :-

../gdb-7.2/bfd/bfd.c: In function 'bfd_assert':
../gdb-7.2/bfd/bfd.c:925: error: 'BFD_VERSION_STRING' undeclared
(first use in this function)
../gdb-7.2/bfd/bfd.c:925: error: (Each undeclared identifier is
reported only once
../gdb-7.2/bfd/bfd.c:925: error: for each function it appears in.)

which appears to be caused by "bfdver.h" being completely empty!

This file should be created by the configure script, and I can't see
why it doesn't get set
up with the relevant information. Interestingly, building Binutils as
part of the whole
toolchain creation process has no problems, and "bfdver.h" is set up
correctly. It looks
like there are some differences between the Binutils and GDB versions
of BFD, but
I'm not expert enough to see what's causing the problem.

Comparing the basic (sparc-elf) and RTEMS builds, the only thing that
really stands out
in the config and makefiles is that RTEMS includes coff bits, e.g. the
list of targets for
"bfd_backends" is identical apart from the addition of
"coff-sparc.lo", and similar changes
for "havevecs" and "tdefaults".

However, I can't see any connection between adding coff targets and
the BFD version
string setup...

Any hints, tips or clues will be gratefully received,

Cheers,

David P.