From cd644ce8be2d1ba8d759ce4c00a2ded5a040b70d Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 7 Apr 2022 23:10:16 +0200 Subject: 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 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. --- libgomp/plugin/plugin-nvptx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libgomp/plugin/plugin-nvptx.c') diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c index b28dfca..387bcbb 100644 --- a/libgomp/plugin/plugin-nvptx.c +++ b/libgomp/plugin/plugin-nvptx.c @@ -41,7 +41,7 @@ #include "oacc-int.h" #include -#if PLUGIN_NVPTX_DYNAMIC +#ifndef PLUGIN_NVPTX_INCLUDE_SYSTEM_CUDA_H # include "cuda/cuda.h" #else # include @@ -85,7 +85,7 @@ CUresult cuOccupancyMaxPotentialBlockSize(int *, int *, CUfunction, #define DO_PRAGMA(x) _Pragma (#x) -#if PLUGIN_NVPTX_DYNAMIC +#ifndef PLUGIN_NVPTX_LINK_LIBCUDA # include struct cuda_lib_s { -- cgit v1.1