[PATCH GOLD] [2/N mingw host] Allow plugin.cc to compile

Andrew Pinski Andrew_Pinski@playstation.sony.com
Wed Oct 7 00:10:00 GMT 2009


Hi,
  This patch just allows plugin.cc to compile under mingw.  This patch
does not fix up plugin support under mingw at all.  We most likely
either should use libltdl or create a little dlopen/dlsym wrapper for
mingw support.

OK?  Built and tested on i686-linux-gnu.

Thanks,
Andrew Pinski

ChangeLog:
* plugin.cc: Don't include dlfcn.h when ENABLE_PLUGINS is not defined.
-------------- next part --------------
Index: gold/plugin.cc
===================================================================
RCS file: /cvs/src/src/gold/plugin.cc,v
retrieving revision 1.19
diff -u -p -r1.19 plugin.cc
--- gold/plugin.cc	6 Oct 2009 20:15:09 -0000	1.19
+++ gold/plugin.cc	7 Oct 2009 00:04:58 -0000
@@ -25,7 +25,10 @@
 #include <cstring>
 #include <string>
 #include <vector>
+
+#ifdef ENABLE_PLUGINS
 #include <dlfcn.h>
+#endif
 
 #include "gold.h"
 #include "parameters.h"


More information about the Binutils mailing list