Hello.

Following patch fixes small issue in situations where --with-hsa-runtime{-lib} 
is
not provided to configure script. Currently, we search for 
'/libhsa-runtime64.so',
which is wrong.

Installed to the HSA branch as r239495.

Martin
>From 0162a1ecbe9c1dd1f63db264473d2165d79e979e Mon Sep 17 00:00:00 2001
From: marxin <mli...@suse.cz>
Date: Tue, 16 Aug 2016 12:14:09 +0200
Subject: [PATCH] HSA configure: add conditionally slash to HSA_RUNTIME_LIB

libgomp/ChangeLog:

2016-08-16  Martin Liska  <mli...@suse.cz>

	* configure: Add conditionally slash to HSA_RUNTIME_LIB.
	* plugin/configfrag.ac: Likewise.
---
 libgomp/configure            | 6 +++++-
 libgomp/plugin/configfrag.ac | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/libgomp/configure b/libgomp/configure
index 9a09369..6b3e639 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -15448,9 +15448,13 @@ 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/"
+#define HSA_RUNTIME_LIB "$HSA_RUNTIME_LIB"
 _ACEOF
 
 
diff --git a/libgomp/plugin/configfrag.ac b/libgomp/plugin/configfrag.ac
index e5e554b..292829f 100644
--- a/libgomp/plugin/configfrag.ac
+++ b/libgomp/plugin/configfrag.ac
@@ -242,5 +242,9 @@ 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.])
 
-AC_DEFINE_UNQUOTED([HSA_RUNTIME_LIB], ["$HSA_RUNTIME_LIB/"],
+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.])
-- 
2.9.2

Reply via email to