gcc/libgomp
Tom de Vries 8e09a12f01 [libgomp, nvptx] Fall back to cuLinkAddData/cuLinkCreate if _v2 not found
Cuda driver api functions cuLinkAddData and cuLinkCreate are available starting
version 5.5.  In version 6.5, they are remapped onto _v2 versions.

The dlopen interface of the libgomp nvptx plugin uses the _v2 versions, so it
won't work with a cuda driver with driver api version lower than 6.5.

This patch fixes the problem by testing for the presence of the _v2 versions,
and falling back to the original versions in case of absence of the _v2
versions.

Build on x86_64 with nvptx accelerator and reg-tested libgomp, both with and
without --without-cuda-driver.

2018-08-08  Tom de Vries  <tdevries@suse.de>

	* plugin/cuda-lib.def (cuLinkAddData_v2, cuLinkCreate_v2): Declare using
	CUDA_ONE_CALL_MAYBE_NULL.
	* plugin/plugin-nvptx.c (cuLinkAddData, cuLinkCreate): Undef and declare.
	(cuLinkAddData_v2, cuLinkCreate_v2): Declare.
	(link_ptx): Fall back to cuLinkAddData/cuLinkCreate if the _v2 versions
	are not found.

From-SVN: r263408
2018-08-08 14:26:37 +00:00
..
config [libgomp] Truncate config/nvptx/oacc-parallel.c 2018-08-01 13:01:45 -07:00
plugin [libgomp, nvptx] Fall back to cuLinkAddData/cuLinkCreate if _v2 not found 2018-08-08 14:26:37 +00:00
testsuite [nvptx] Ignore c++ exceptions 2018-08-02 15:59:01 +00:00
acinclude.m4 Enable building libgomp with Intel CET 2017-11-17 22:22:09 +01:00
aclocal.m4 libgomp: regenerate with automake-1.11.6 2016-11-30 21:05:33 +03:00
affinity.c Update copyright years. 2018-01-03 11:03:58 +01:00
alloc.c Update copyright years. 2018-01-03 11:03:58 +01:00
atomic.c Update copyright years. 2018-01-03 11:03:58 +01:00
barrier.c Update copyright years. 2018-01-03 11:03:58 +01:00
ChangeLog [libgomp, nvptx] Fall back to cuLinkAddData/cuLinkCreate if _v2 not found 2018-08-08 14:26:37 +00:00
ChangeLog.graphite
config.h.in configfrag.ac: For --without-cuda-driver don't initialize CUDA_DRIVER_INCLUDE nor CUDA_DRIVER_LIB. 2017-01-17 10:44:17 +01:00
configure [libgomp, nvptx, --without-cuda-driver] Don't use system cuda driver 2018-08-04 20:07:22 +00:00
configure.ac Enable building libgomp with Intel CET 2017-11-17 22:22:09 +01:00
configure.tgt re PR bootstrap/80531 (RC1 bootstrap comparison failure) 2017-04-27 22:03:01 +02:00
critical.c Update copyright years. 2018-01-03 11:03:58 +01:00
env.c [openacc] Move GOMP_OPENACC_DIM parsing out of nvptx plugin 2018-05-02 17:53:56 +00:00
error.c Update copyright years. 2018-01-03 11:03:58 +01:00
fortran.c Update copyright years. 2018-01-03 11:03:58 +01:00
hashtab.h Update copyright years. 2018-01-03 11:03:58 +01:00
icv-device.c Update copyright years. 2018-01-03 11:03:58 +01:00
icv.c Update copyright years. 2018-01-03 11:03:58 +01:00
iter_ull.c Update copyright years. 2018-01-03 11:03:58 +01:00
iter.c Update copyright years. 2018-01-03 11:03:58 +01:00
libgomp_f.h.in Update copyright years. 2018-01-03 11:03:58 +01:00
libgomp_g.h Update copyright years. 2018-01-03 11:03:58 +01:00
libgomp-plugin.c Update copyright years. 2018-01-03 11:03:58 +01:00
libgomp-plugin.h Update copyright years. 2018-01-03 11:03:58 +01:00
libgomp.h Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
libgomp.map Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
libgomp.spec.in
libgomp.texi libgomp.texi (Top): Move www.openmp.org to https. 2018-06-24 20:38:14 +00:00
lock.c Update copyright years. 2018-01-03 11:03:58 +01:00
loop_ull.c Update copyright years. 2018-01-03 11:03:58 +01:00
loop.c Update copyright years. 2018-01-03 11:03:58 +01:00
Makefile.am re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) 2017-01-17 10:38:48 +01:00
Makefile.in re PR fortran/84381 (replace non-std 'call abort' by 'stop 1' in gfortran testsuite) 2018-03-25 16:00:52 +00:00
oacc-async.c [openacc] Factor out async argument utility functions 2018-05-09 13:52:49 +00:00
oacc-cuda.c [openacc] Factor out async argument utility functions 2018-05-09 13:52:49 +00:00
oacc-host.c Update copyright years. 2018-01-03 11:03:58 +01:00
oacc-init.c Update copyright years. 2018-01-03 11:03:58 +01:00
oacc-int.h [openacc] Factor out async argument utility functions 2018-05-09 13:52:49 +00:00
oacc-mem.c Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
oacc-parallel.c Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
oacc-plugin.c [openacc] Move GOMP_OPENACC_DIM parsing out of nvptx plugin 2018-05-02 17:53:56 +00:00
oacc-plugin.h [openacc] Move GOMP_OPENACC_DIM parsing out of nvptx plugin 2018-05-02 17:53:56 +00:00
omp_lib.f90.in Update copyright years. 2018-01-03 11:03:58 +01:00
omp_lib.h.in Update copyright years. 2018-01-03 11:03:58 +01:00
omp.h.in re PR libgomp/84096 (Wrong prototype for omp_init_nest_lock_with_hint() in "omp.h.in") 2018-01-30 00:38:01 +01:00
openacc_lib.h Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
openacc.f90 Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
openacc.h Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
ordered.c Update copyright years. 2018-01-03 11:03:58 +01:00
parallel.c Update copyright years. 2018-01-03 11:03:58 +01:00
priority_queue.c Update copyright years. 2018-01-03 11:03:58 +01:00
priority_queue.h Update copyright years. 2018-01-03 11:03:58 +01:00
sections.c Update copyright years. 2018-01-03 11:03:58 +01:00
secure_getenv.h Update copyright years. 2018-01-03 11:03:58 +01:00
single.c Update copyright years. 2018-01-03 11:03:58 +01:00
splay-tree.c Update copyright years. 2018-01-03 11:03:58 +01:00
splay-tree.h Update copyright years. 2018-01-03 11:03:58 +01:00
target.c Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
task.c Update copyright years. 2018-01-03 11:03:58 +01:00
taskloop.c Update copyright years. 2018-01-03 11:03:58 +01:00
team.c Update copyright years. 2018-01-03 11:03:58 +01:00
work.c Update copyright years. 2018-01-03 11:03:58 +01:00