On 04-11-14 23:34, Tom de Vries wrote:
Thomas,

this patch sets LIBGOMP_PLUGIN_PATH to the .libs dir in the build area, if
LIBGOMP_PLUGIN_PATH has not been defined.

This allows f.i. a gcc build without an accelerator configured, to automatically
pick up the host_nonshm plugin.


Updated for recent change where plugins in build area moved from libgomp/.libs to libgomp/plugin/.libs.

OK for gomp-4_0-branch?

Thanks,
- Tom

2014-11-03  Tom de Vries  <t...@codesourcery.com>

	* testsuite/libgomp.oacc-c++/c++.exp: Set default LIBGOMP_PLUGIN_PATH.
	Print used LIBGOMP_PLUGIN_PATH.
	* testsuite/libgomp.oacc-c/c.exp: Same.
	* testsuite/libgomp.oacc-fortran/fortran.exp: Same.
---
 libgomp/testsuite/libgomp.oacc-c++/c++.exp         | 5 +++++
 libgomp/testsuite/libgomp.oacc-c/c.exp             | 5 +++++
 libgomp/testsuite/libgomp.oacc-fortran/fortran.exp | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/libgomp/testsuite/libgomp.oacc-c++/c++.exp b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
index 9d5bf0b..c6dbdf0 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/c++.exp
+++ b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
@@ -73,6 +73,11 @@ if { $lang_test_file_found } {
 	set libstdcxx_includes ""
     }
 
+    if { ![info exists env(LIBGOMP_PLUGIN_PATH)] } {
+	set env(LIBGOMP_PLUGIN_PATH) "${blddir}/plugin/.libs"
+    }
+    puts "Using LIBGOMP_PLUGIN_PATH $env(LIBGOMP_PLUGIN_PATH)"
+
     # Todo: get list of accelerators from configure options --enable-accelerator.
     set accels { "nvidia" "host_nonshm" }
 
diff --git a/libgomp/testsuite/libgomp.oacc-c/c.exp b/libgomp/testsuite/libgomp.oacc-c/c.exp
index 0c31447..265d428 100644
--- a/libgomp/testsuite/libgomp.oacc-c/c.exp
+++ b/libgomp/testsuite/libgomp.oacc-c/c.exp
@@ -39,6 +39,11 @@ set ld_library_path $always_ld_library_path
 append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
 set_ld_library_path_env_vars
 
+if { ![info exists env(LIBGOMP_PLUGIN_PATH)] } {
+    set env(LIBGOMP_PLUGIN_PATH) "${blddir}/plugin/.libs"
+}
+puts "Using LIBGOMP_PLUGIN_PATH $env(LIBGOMP_PLUGIN_PATH)"
+
 # Todo: get list of accelerators from configure options --enable-accelerator.
 set accels { "nvidia" "host_nonshm" }
 
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
index 312f947..346fb7d 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
@@ -66,6 +66,11 @@ if { $lang_test_file_found } {
     append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
     set_ld_library_path_env_vars
 
+    if { ![info exists env(LIBGOMP_PLUGIN_PATH)] } {
+	set env(LIBGOMP_PLUGIN_PATH) "${blddir}/plugin/.libs"
+    }
+    puts "Using LIBGOMP_PLUGIN_PATH $env(LIBGOMP_PLUGIN_PATH)"
+
     # Todo: get list of accelerators from configure options --enable-accelerator.
     set accels { "nvidia" "host_nonshm" }
 
-- 
1.9.1

Reply via email to