summaryrefslogtreecommitdiff
path: root/libgomp/configure
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2022-04-07 23:10:16 +0200
committerThomas Schwinge <thomas@codesourcery.com>2022-05-12 14:14:13 +0200
commitcd644ce8be2d1ba8d759ce4c00a2ded5a040b70d (patch)
treeadf56f4be183630db7aa855ab51ee71c7feacc12 /libgomp/configure
parentedbd2b1caaa79d68467418a4571c3b09f9602805 (diff)
libgomp nvptx plugin: Split 'PLUGIN_NVPTX_DYNAMIC' into 'PLUGIN_NVPTX_INCLUDE_SYSTEM_CUDA_H' and 'PLUGIN_NVPTX_LINK_LIBCUDA'
Including the GCC-shipped 'include/cuda/cuda.h' vs. system <cuda.h> and 'dlopen'ing the CUDA Driver library vs. linking it are separate concerns. libgomp/ * plugin/Makefrag.am: Handle 'PLUGIN_NVPTX_DYNAMIC'. * plugin/configfrag.ac (PLUGIN_NVPTX_DYNAMIC): Change 'AC_DEFINE_UNQUOTED' into 'AM_CONDITIONAL'. * plugin/plugin-nvptx.c: Split 'PLUGIN_NVPTX_DYNAMIC' into 'PLUGIN_NVPTX_INCLUDE_SYSTEM_CUDA_H' and 'PLUGIN_NVPTX_LINK_LIBCUDA'. * Makefile.in: Regenerate. * config.h.in: Likewise. * configure: Likewise.
Diffstat (limited to 'libgomp/configure')
-rwxr-xr-xlibgomp/configure21
1 files changed, 15 insertions, 6 deletions
diff --git a/libgomp/configure b/libgomp/configure
index be675a6b8ab..0df47cf96e3 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -667,6 +667,8 @@ OPT_LDFLAGS
SECTION_LDFLAGS
PLUGIN_GCN_FALSE
PLUGIN_GCN_TRUE
+PLUGIN_NVPTX_DYNAMIC_FALSE
+PLUGIN_NVPTX_DYNAMIC_TRUE
PLUGIN_NVPTX_FALSE
PLUGIN_NVPTX_TRUE
offload_additional_lib_paths
@@ -11412,7 +11414,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11415 "configure"
+#line 11417 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11518,7 +11520,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11521 "configure"
+#line 11523 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15368,10 +15370,13 @@ else
PLUGIN_NVPTX_FALSE=
fi
-
-cat >>confdefs.h <<_ACEOF
-#define PLUGIN_NVPTX_DYNAMIC $PLUGIN_NVPTX_DYNAMIC
-_ACEOF
+ if test $PLUGIN_NVPTX_DYNAMIC = 1; then
+ PLUGIN_NVPTX_DYNAMIC_TRUE=
+ PLUGIN_NVPTX_DYNAMIC_FALSE='#'
+else
+ PLUGIN_NVPTX_DYNAMIC_TRUE='#'
+ PLUGIN_NVPTX_DYNAMIC_FALSE=
+fi
if test $PLUGIN_GCN = 1; then
PLUGIN_GCN_TRUE=
@@ -17140,6 +17145,10 @@ if test -z "${PLUGIN_NVPTX_TRUE}" && test -z "${PLUGIN_NVPTX_FALSE}"; then
as_fn_error $? "conditional \"PLUGIN_NVPTX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${PLUGIN_NVPTX_DYNAMIC_TRUE}" && test -z "${PLUGIN_NVPTX_DYNAMIC_FALSE}"; then
+ as_fn_error $? "conditional \"PLUGIN_NVPTX_DYNAMIC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${PLUGIN_GCN_TRUE}" && test -z "${PLUGIN_GCN_FALSE}"; then
as_fn_error $? "conditional \"PLUGIN_GCN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5