new plugin bfd_target breaks gdb with --enable-targets=all

Nick Clifton nickc@redhat.com
Wed May 27 17:04:00 GMT 2009


Hi Rafael,

>> Would that new version make sure we're not building plugin.c with
>> --enable-targets=all on non -ldl, non dlopen targets? Â E.g., mingw.
>> A quick lookaround Makefile.am didn't spot where that is prevented in
>> the current sources.
> 
> It should, yes. It is in
> http://sourceware.org/ml/binutils/2009-05/msg00359.html

But that only works when --enable-plugin is used.  If you build a 
toolchain with --enable-target=all but without --enable-plugin then you get:

libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes 
-Werror -g -O2 -o size size.o bucomm.o version.o filemode.o 
../bfd/.libs/libbfd.a ../libiberty/libiberty.a -lz
../bfd/.libs/libbfd.a(plugin.o): In function `try_load_plugin':
.../bfd/plugin.c:127: undefined reference to `dlopen'
.../bfd/plugin.c:134: undefined reference to `dlsym'
.../bfd/plugin.c:130: undefined reference to `dlerror'

So - what you need to do is to prevent the plugin target from being 
included in an all-targets toolchain, unless --enable-plugin has been 
specified as well.

Cheers
   Nick



More information about the Binutils mailing list