Re: PATCH: fix up fake BFD functions in cgen-cpu/tracedis.cxx
Jim Blandy <[email protected]>
| Newsgroups | gmane.comp.emulators.sid.devel |
|---|---|
| Message-ID | <[email protected]> |
I've committed this. Jim Blandy <[email protected]> writes: > In trying to build SID with --disable-shared, I found that linking > 'sid' died because the references to these functions in libopcodes > weren't being satisfied. As it turns out: > > $ nm tracedis.o | grep bfd_get_bits > 000024de T _Z12bfd_get_bitsPhii > $ > > But when I added the 'extern "C"' thingies, the compiler was suddenly > able to check the definitions against the declarations in bfd/bfd.h > again. Those changed recently; see Alan Modra's 2004-03-15 change in > bfd/ChangeLog. > > 2004-03-23 Jim Blandy <[email protected]> > > * tracedis.cxx (bfd_get_arch, bfd_getb16, bfd_getl16, bfd_getb32) > (bfd_getl32, bfd_put_bits, bfd_get_bits, bfd_lookup_arch): These > definitions are meant to satisfy references in libopcodes, which > is C code, so declare these with 'extern "C"'. Adjust types to > match those declared in the BFD header file.