diff options
author | Richard Biener <rguenther@suse.de> | 2025-02-07 14:42:23 +0100 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2025-02-07 16:01:46 +0100 |
commit | e22962538f64bb6e5ac87977ec8a5d86f4ef21cb (patch) | |
tree | 108992859a92b904625910d73ae72b801677dd66 /gcc | |
parent | 2a2bd96d0d2109384a0eedde843ba811d2e18738 (diff) | |
download | gcc-e22962538f64bb6e5ac87977ec8a5d86f4ef21cb.zip gcc-e22962538f64bb6e5ac87977ec8a5d86f4ef21cb.tar.gz gcc-e22962538f64bb6e5ac87977ec8a5d86f4ef21cb.tar.bz2 |
jit/118780 - make sure to include dlfcn.h when plugin support is disabled
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/jit/jit-playback.cc | 1 | ||||
-rw-r--r-- | gcc/jit/jit-result.cc | 1 | ||||
-rw-r--r-- | gcc/plugin.cc | 1 | ||||
-rw-r--r-- | gcc/system.h | 2 |
4 files changed, 4 insertions, 1 deletions
diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc index c9fcebc..6946f10 100644 --- a/gcc/jit/jit-playback.cc +++ b/gcc/jit/jit-playback.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #define INCLUDE_MUTEX +#define INCLUDE_DLFCN_H #include "libgccjit.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/jit/jit-result.cc b/gcc/jit/jit-result.cc index 1c793ae..2ad6deb 100644 --- a/gcc/jit/jit-result.cc +++ b/gcc/jit/jit-result.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ #include "config.h" +#define INCLUDE_DLFCN_H #include "system.h" #include "coretypes.h" diff --git a/gcc/plugin.cc b/gcc/plugin.cc index 6d33949..0de2cc2 100644 --- a/gcc/plugin.cc +++ b/gcc/plugin.cc @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see APIs described in doc/plugin.texi. */ #include "config.h" +#define INCLUDE_DLFCN_H #include "system.h" #include "coretypes.h" #include "options.h" diff --git a/gcc/system.h b/gcc/system.h index 39d28ba..e516b49 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -694,7 +694,7 @@ extern int vsnprintf (char *, size_t, const char *, va_list); # 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 |