This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index: plugin.cc
===================================================================
RCS file: /cvs/src/src/gold/plugin.cc,v
retrieving revision 1.21
diff -u -r1.21 plugin.cc
--- plugin.cc	10 Oct 2009 07:39:04 -0000	1.21
+++ plugin.cc	12 Oct 2009 05:59:38 -0000
@@ -20,6 +20,8 @@
 // Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
 // MA 02110-1301, USA.
 
+#include "gold.h"
+
 #include <cstdio>
 #include <cstdarg>
 #include <cstring>
@@ -30,7 +32,6 @@
 #include <dlfcn.h>
 #endif
 
-#include "gold.h"
 #include "parameters.h"
 #include "errors.h"
 #include "fileread.h"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]