re PR c/46902 (gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9)
authorIain Sandoe <iains@gcc.gnu.org>
Sun, 9 Jan 2011 12:41:33 +0000 (12:41 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Sun, 9 Jan 2011 12:41:33 +0000 (12:41 +0000)
PR gcc/46902
PR testsuite/46912
* plugin.c: Move include of dlfcn.h from here...
* system.h: ... to here.

From-SVN: r168611

gcc/ChangeLog
gcc/plugin.c
gcc/system.h

index e9bee6d61c3d08b280db3963d9549d7eeaf05b47..0bb8b7ea1c1d31474238feeb9a591fda2e515450 100644 (file)
@@ -1,4 +1,11 @@
-2010-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+2011-01-09  Iain Sandoe  <iains@gcc.gnu.org>
+
+       PR gcc/46902
+       PR testsuite/46912
+       * plugin.c: Move include of dlfcn.h from here...
+       * system.h: ... to here.
+
+2011-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * doc/cpp.texi (C++ Named Operators): Fix markup for header
        file name.
index 2179b8192885d47dbf42c16fd8a88653ea39b926..c93daed055d7a346053b218b13d07b093d15393a 100644 (file)
@@ -22,15 +22,6 @@ along with GCC; see the file COPYING3.  If not see
 
 #include "config.h"
 #include "system.h"
-
-/* If plugin support is not enabled, do not try to execute any code
-   that may reference libdl.  The generic code is still compiled in to
-   avoid including too many conditional compilation paths in the rest
-   of the compiler.  */
-#ifdef ENABLE_PLUGIN
-#include <dlfcn.h>
-#endif
-
 #include "coretypes.h"
 #include "diagnostic-core.h"
 #include "tree.h"
index a9a29f16b2140fac2dc270e3730a46eaa2ee8353..0bf9b92568510d900dceeca1fb76e97e1f5d08ee 100644 (file)
@@ -583,6 +583,11 @@ extern int vsnprintf(char *, size_t, const char *, va_list);
 # endif
 #endif
 
+#if defined (ENABLE_PLUGIN) && defined (HAVE_DLFCN_H)
+/* If plugin support is enabled, we could use libdl.  */
+#include <dlfcn.h>
+#endif
+
 /* Get libiberty declarations.  */
 #include "libiberty.h"