]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgomp HSA/GCN plugins: don't prepend the 'HSA_RUNTIME_LIB' path to 'libhsa-runtime6...
authorThomas Schwinge <thomas@codesourcery.com>
Thu, 25 Jun 2020 09:59:42 +0000 (11:59 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Thu, 25 Mar 2021 13:21:25 +0000 (14:21 +0100)
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)

libgomp/ChangeLog.omp
libgomp/config.h.in
libgomp/configure
libgomp/plugin/configfrag.ac
libgomp/plugin/plugin-gcn.c
libgomp/plugin/plugin-hsa.c

index 05788d5c27a267cfcce09aac40aeea15ecc3c851..e8e1ce96fc3bb4bf00aa08011571dab5f9c39551 100644 (file)
@@ -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.
 
index 8de69c2513c4fe79c832a8af72c2caae3fef1888..8b65e5a293eada36cf3991eb5633a77b539712ad 100644 (file)
 /* 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
 
index 62fc67e8dfec942a7c58a8f8bc3fc883d33b089f..8e673edf5cd5ebcd6c54c589bb371f80ce2eaf89 100755 (executable)
@@ -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
index fc91702a43443548c4469a4a11b0e946c5b3c992..69a3cf4aeaf2df538bc03013c3000a078c764538 100644 (file)
@@ -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.])
index d2786c651385cb9f3a988ec5aa53ab2cb9030222..5d96b33351b8335719697ff9f3c6a0d774e0d56b 100644 (file)
@@ -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");
 
index bddb690ca14fbde9c6608927e90e3d17fca926e6..800da9a3273c65a512ddf13a7799109517283126 100644 (file)
@@ -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");
 }