The following makes the dlfcn.h explicitly requested which avoids
build failure when JIT is enabled but plugin support disabled as
currently the include is conditional on plugin support.
PR jit/118780
gcc/
* system.h: Check INCLUDE_DLFCN_H for including dlfcn.h instead
of ENABLE_PLUGIN.
* plugin.cc: Define INCLUDE_DLFCN_H.
gcc/jit/
* jit-playback.cc: Define INCLUDE_DLFCN_H.
* jit-result.cc: Likewise.
(cherry picked from commit
e22962538f64bb6e5ac87977ec8a5d86f4ef21cb)
#include "config.h"
#define INCLUDE_MUTEX
+#define INCLUDE_DLFCN_H
#include "libgccjit.h"
#include "system.h"
#include "coretypes.h"
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_DLFCN_H
#include "system.h"
#include "coretypes.h"
APIs described in doc/plugin.texi. */
#include "config.h"
+#define INCLUDE_DLFCN_H
#include "system.h"
#include "coretypes.h"
#include "options.h"
# endif
#endif
-#if defined (ENABLE_PLUGIN) && defined (HAVE_DLFCN_H)
+#if defined (INCLUDE_DLFCN_H) && defined (HAVE_DLFCN_H)
/* If plugin support is enabled, we could use libdl. */
#include <dlfcn.h>
#endif