[gcc/devel/omp/gcc-10] libgomp HSA/GCN plugins: don't prepend the 'HSA_RUNTIME_LIB' path to 'libhsa-runtime64.so'
Thomas Schwinge
tschwinge@gcc.gnu.org
Thu Mar 25 13:22:04 GMT 2021
https://gcc.gnu.org/g:312ed310cf68c6f28ecba0b439cfa7252d0d213b
commit 312ed310cf68c6f28ecba0b439cfa7252d0d213b
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Thu Jun 25 11:59:42 2020 +0200
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:
---
libgomp/ChangeLog.omp | 7 +++++++
libgomp/config.h.in | 3 ---
libgomp/configure | 10 ----------
libgomp/plugin/configfrag.ac | 7 -------
libgomp/plugin/plugin-gcn.c | 2 +-
libgomp/plugin/plugin-hsa.c | 2 +-
6 files changed, 9 insertions(+), 22 deletions(-)
diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index 05788d5c27a..e8e1ce96fc3 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,5 +1,12 @@
2021-03-25 Thomas Schwinge <thomas@codesourcery.com>
+ * 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 8de69c2513c..8b65e5a293e 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 62fc67e8dfe..8e673edf5cd 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 fc91702a434..69a3cf4aeaf 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 d2786c65138..5d96b33351b 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 bddb690ca14..800da9a3273 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");
}
More information about the Gcc-cvs
mailing list