From: Thomas Schwinge Date: Thu, 25 Jun 2020 09:59:42 +0000 (+0200) Subject: libgomp HSA/GCN plugins: don't prepend the 'HSA_RUNTIME_LIB' path to 'libhsa-runtime6... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=312ed310cf68c6f28ecba0b439cfa7252d0d213b;p=thirdparty%2Fgcc.git libgomp HSA/GCN plugins: don't prepend the 'HSA_RUNTIME_LIB' path to 'libhsa-runtime64.so' For unknown reasons, this had gotten added for the libgomp HSA plugin in commit b8d89b03db5f212919e4571671ebb4f5f8b1e19d (r242749) "Remove build dependence on HSA run-time", and later propagated into the GCN plugin. libgomp/ * plugin/plugin-hsa.c (init_enviroment_variables): Don't prepend the 'HSA_RUNTIME_LIB' path to 'libhsa-runtime64.so'. * plugin/plugin-gcn.c (init_environment_variables): Likewise. * plugin/configfrag.ac (HSA_RUNTIME_LIB): Clean up. * config.h.in: Regenerate. * configure: Likewise. (cherry picked from commit 7c1e856bedb4ae190c420ec2d2ca5e08730cf21d) --- diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 05788d5c27a2..e8e1ce96fc3b 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,5 +1,12 @@ 2021-03-25 Thomas Schwinge + * plugin/plugin-hsa.c (init_enviroment_variables): Don't prepend + the 'HSA_RUNTIME_LIB' path to 'libhsa-runtime64.so'. + * plugin/plugin-gcn.c (init_environment_variables): Likewise. + * plugin/configfrag.ac (HSA_RUNTIME_LIB): Clean up. + * config.h.in: Regenerate. + * configure: Likewise. + * testsuite/libgomp.oacc-fortran/derivedtypes-arrays-1.f90: OpenACC 'serial' construct diagnostic for nvptx offloading. diff --git a/libgomp/config.h.in b/libgomp/config.h.in index 8de69c2513c4..8b65e5a293ea 100644 --- a/libgomp/config.h.in +++ b/libgomp/config.h.in @@ -130,9 +130,6 @@ /* Define to 1 if you have the `__secure_getenv' function. */ #undef HAVE___SECURE_GETENV -/* Define path to HSA runtime. */ -#undef HSA_RUNTIME_LIB - /* Define to 1 if GNU symbol versioning is used for libgomp. */ #undef LIBGOMP_GNU_SYMBOL_VERSIONING diff --git a/libgomp/configure b/libgomp/configure index 62fc67e8dfec..8e673edf5cd5 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -15509,16 +15509,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF -if test "$HSA_RUNTIME_LIB" != ""; then - HSA_RUNTIME_LIB="$HSA_RUNTIME_LIB/" -fi - - -cat >>confdefs.h <<_ACEOF -#define HSA_RUNTIME_LIB "$HSA_RUNTIME_LIB" -_ACEOF - - # Check for functions needed. for ac_func in getloadavg clock_gettime strtoull diff --git a/libgomp/plugin/configfrag.ac b/libgomp/plugin/configfrag.ac index fc91702a4344..69a3cf4aeaf2 100644 --- a/libgomp/plugin/configfrag.ac +++ b/libgomp/plugin/configfrag.ac @@ -310,10 +310,3 @@ AC_DEFINE_UNQUOTED([PLUGIN_HSA], [$PLUGIN_HSA], AM_CONDITIONAL([PLUGIN_GCN], [test $PLUGIN_GCN = 1]) AC_DEFINE_UNQUOTED([PLUGIN_GCN], [$PLUGIN_GCN], [Define to 1 if the GCN plugin is built, 0 if not.]) - -if test "$HSA_RUNTIME_LIB" != ""; then - HSA_RUNTIME_LIB="$HSA_RUNTIME_LIB/" -fi - -AC_DEFINE_UNQUOTED([HSA_RUNTIME_LIB], ["$HSA_RUNTIME_LIB"], - [Define path to HSA runtime.]) diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c index d2786c651385..5d96b33351b8 100644 --- a/libgomp/plugin/plugin-gcn.c +++ b/libgomp/plugin/plugin-gcn.c @@ -1074,7 +1074,7 @@ init_environment_variables (void) hsa_runtime_lib = secure_getenv ("HSA_RUNTIME_LIB"); if (hsa_runtime_lib == NULL) - hsa_runtime_lib = HSA_RUNTIME_LIB "libhsa-runtime64.so.1"; + hsa_runtime_lib = "libhsa-runtime64.so.1"; support_cpu_devices = secure_getenv ("GCN_SUPPORT_CPU_DEVICES"); diff --git a/libgomp/plugin/plugin-hsa.c b/libgomp/plugin/plugin-hsa.c index bddb690ca14f..800da9a3273c 100644 --- a/libgomp/plugin/plugin-hsa.c +++ b/libgomp/plugin/plugin-hsa.c @@ -254,7 +254,7 @@ init_enviroment_variables (void) hsa_runtime_lib = secure_getenv ("HSA_RUNTIME_LIB"); if (hsa_runtime_lib == NULL) - hsa_runtime_lib = HSA_RUNTIME_LIB "libhsa-runtime64.so"; + hsa_runtime_lib = "libhsa-runtime64.so"; support_cpu_devices = secure_getenv ("HSA_SUPPORT_CPU_DEVICES"); }