@@ -1,5 +1,11 @@
2014-12-17 Thomas Schwinge <thomas@codesourcery.com>
+ * testsuite/Makefile.am: Don't export OFFLOAD_TARGETS,
+ OFFLOAD_ADDITIONAL_OPTIONS, and OFFLOAD_ADDITIONAL_LIB_PATHS...
+ * testsuite/libgomp-test-support.exp.in: ..., and instead set
+ offload_targets, offload_additional_options, and
+ offload_additional_lib_paths here. Update all users.
+
* testsuite/libgomp.oacc-c++/c++.exp
(check_effective_target_oacc_c): Remove, and ...
* testsuite/libgomp.oacc-c/c.exp (check_effective_target_oacc_c):
@@ -11,8 +11,3 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
_RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)"
-
-# Used for support non-fallback offloading.
-export OFFLOAD_TARGETS = $(offload_targets)
-export OFFLOAD_ADDITIONAL_OPTIONS = $(offload_additional_options)
-export OFFLOAD_ADDITIONAL_LIB_PATHS = $(offload_additional_lib_paths)
@@ -421,11 +421,6 @@ uninstall-am:
uninstall uninstall-am
-# Used for support non-fallback offloading.
-export OFFLOAD_TARGETS = $(offload_targets)
-export OFFLOAD_ADDITIONAL_OPTIONS = $(offload_additional_options)
-export OFFLOAD_ADDITIONAL_LIB_PATHS = $(offload_additional_lib_paths)
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
@@ -111,13 +111,9 @@ proc libgomp_init { args } {
# Compute what needs to be put into LD_LIBRARY_PATH
set always_ld_library_path ".:${blddir}/.libs"
- # Get offload-related variables from environment (exported by Makefile)
- set offload_targets [getenv OFFLOAD_TARGETS]
- set offload_additional_options [getenv OFFLOAD_ADDITIONAL_OPTIONS]
- set offload_additional_lib_paths [getenv OFFLOAD_ADDITIONAL_LIB_PATHS]
-
# Add liboffloadmic build directory in LD_LIBRARY_PATH to support
# non-fallback testing for Intel MIC targets
+ global offload_targets
if { [string match "*-intelmic-*" $offload_targets]
|| [string match "*-intelmicemul-*" $offload_targets] } {
append always_ld_library_path ":${blddir}/../liboffloadmic/.libs"
@@ -126,6 +122,7 @@ proc libgomp_init { args } {
append always_ld_library_path ":${blddir}/../libstdc++-v3/src/.libs"
}
+ global offload_additional_lib_paths
if { $offload_additional_lib_paths != "" } {
append always_ld_library_path "${offload_additional_lib_paths}"
}
@@ -215,6 +212,7 @@ proc libgomp_init { args } {
# Used for support non-fallback offloading.
# Help GCC to find target mkoffload.
+ global offload_additional_options
if { $offload_additional_options != "" } {
lappend ALWAYS_CFLAGS "additional_flags=${offload_additional_options}"
}
@@ -1,2 +1,6 @@
set cuda_driver_include "@CUDA_DRIVER_INCLUDE@"
set cuda_driver_lib "@CUDA_DRIVER_LIB@"
+
+set offload_targets "@offload_targets@"
+set offload_additional_options "@offload_additional_options@"
+set offload_additional_lib_paths "@offload_additional_lib_paths@"