https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93260
Bug ID: 93260
Summary: Deal with missing CUDA etc. installation in libgomp
'-lcuda' etc. test cases
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: openacc, openmp
Severity: enhancement
Priority: P3
Component: libgomp
Assignee: unassigned at gcc dot gnu.org
Reporter: tschwinge at gcc dot gnu.org
CC: frederik at gcc dot gnu.org, jakub at gcc dot gnu.org
Target Milestone: ---
As Jakub mentioned in
<http://mid.mail-archive.com/20191008164909.GW15914@tucnak>, and we recently
discussed internally in context of PR93074, it is possible to build GCC with
nvptx offloading support, but without having a CUDA etc. installation on the
build and host systems: the libgomp nvptx plugin then "doesn't compile/link
against a CUDA Driver installation, but instead uses its own stub header file
('libgomp/plugin/cuda/cuda.h') and then 'dlopen's 'libcuda.so'".
Yet, there are test cases that '#include' various CUDA header files and '-lcuda
-lcublas -lcudart'. This causes FAIL/UNRESOLVED in '--without-cuda-driver'
configurations.
We can either add some DejaGnu magic to make these UNSUPPORTED in such
configurations, or keep them supported by means of replicating the relevant
parts of the header files (hopefully shouldn't be too much in addition to the
existing 'cuda.h'), and adding a small helper file to the testsuite to 'dlopen'
the shared libraries instead of directly linking against them.