[gold] fix (?) gold --enable-plugins build

Ian Lance Taylor iant@google.com
Mon Oct 12 06:02:00 GMT 2009


Steven Bosscher <stevenb.gcc@gmail.com> writes:

> I tried to build gold with plugins enabled (../src/configure
> --enable-gold --enable-plugins) and I got a build error:
>
> ../../src/gold/plugin.cc: In member function ‘void gold::Plugin::load()’:
> ../../src/gold/plugin.cc:102: error: ‘RTLD_NOW’ was not declared in this scope
> ../../src/gold/plugin.cc:102: error: ‘dlopen’ was not declared in this scope
> ../../src/gold/plugin.cc:112: error: ‘dlsym’ was not declared in this scope
> make[4]: *** [plugin.o] Error 1
> make[4]: *** Waiting for unfinished jobs
>
> This happens with a CVS checkout of today.  The problem seems to be
> that gold.h (and therefore config.h) is included after using
> ENABLE_PLUGINS. With the attached patch, the build finishes without
> further trouble for me.
>
> Could someone verify that the patch below is indeed needed, and
> foster-parent it into the gold CVS repo?

This is the right patch.  I committed it to the repository.

Sorry about that.

Ian


2009-10-11  Ian Lance Taylor  <iant@google.com>

	* plugin.cc: Include "gold.h" before other header files.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 586 bytes
Desc: gold.h
URL: <https://sourceware.org/pipermail/binutils/attachments/20091012/7cd3cf3b/attachment.bin>


More information about the Binutils mailing list