[gcc r9-9308] 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:20:48 GMT 2021


https://gcc.gnu.org/g:75e7d34bbf6219f3087567a60ebabb99e1e84995

commit r9-9308-g75e7d34bbf6219f3087567a60ebabb99e1e84995
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/configfrag.ac (HSA_RUNTIME_LIB): Clean up.
            * config.h.in: Regenerate.
            * configure: Likewise.
    
    (cherry picked from commit 7c1e856bedb4ae190c420ec2d2ca5e08730cf21d)

Diff:
---
 libgomp/config.h.in          |  3 ---
 libgomp/configure            | 10 ----------
 libgomp/plugin/configfrag.ac |  7 -------
 libgomp/plugin/plugin-hsa.c  |  2 +-
 4 files changed, 1 insertion(+), 21 deletions(-)

diff --git a/libgomp/config.h.in b/libgomp/config.h.in
index 73f1b12805e..714020db03a 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 de31f97c2c6..6f19f8c5822 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -15813,16 +15813,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 77e1cda1a73..1f52901d4be 100644
--- a/libgomp/plugin/configfrag.ac
+++ b/libgomp/plugin/configfrag.ac
@@ -292,10 +292,3 @@ AC_DEFINE_UNQUOTED([PLUGIN_NVPTX_DYNAMIC], [$PLUGIN_NVPTX_DYNAMIC],
 AM_CONDITIONAL([PLUGIN_HSA], [test $PLUGIN_HSA = 1])
 AC_DEFINE_UNQUOTED([PLUGIN_HSA], [$PLUGIN_HSA],
   [Define to 1 if the HSA 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-hsa.c b/libgomp/plugin/plugin-hsa.c
index e0bc87c9552..fbb3609c811 100644
--- a/libgomp/plugin/plugin-hsa.c
+++ b/libgomp/plugin/plugin-hsa.c
@@ -244,7 +244,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