diff mbox

[gomp4] Set default LIBGOMP_PLUGIN_PATH

Message ID 54595477.3020601@mentor.com
State New
Headers show

Commit Message

Tom de Vries Nov. 4, 2014, 10:34 p.m. UTC
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.

OK for gomp-4_0-branch?

Thanks,
- Tom
diff mbox

Patch

2014-11-03  Tom de Vries  <tom@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.

diff --git a/libgomp/testsuite/libgomp.oacc-c++/c++.exp b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
index 164d7d2..da81deb 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/c++.exp
+++ b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
@@ -62,6 +62,11 @@  if { $lang_test_file_found } {
 	set libstdcxx_includes ""
     }
 
+    if { ![info exists env(LIBGOMP_PLUGIN_PATH)] } {
+	set env(LIBGOMP_PLUGIN_PATH) "${blddir}/.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 318f78e..feb57fd 100644
--- a/libgomp/testsuite/libgomp.oacc-c/c.exp
+++ b/libgomp/testsuite/libgomp.oacc-c/c.exp
@@ -33,6 +33,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}/.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..156ae56 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}/.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