diff options
author | Andrey Turetskiy <andrey.turetskiy@intel.com> | 2014-11-13 14:07:09 +0000 |
---|---|---|
committer | Kirill Yukhin <kyukhin@gcc.gnu.org> | 2014-11-13 14:07:09 +0000 |
commit | d64ae6140f40859c0e73df7ca597cdf08eb31bd2 (patch) | |
tree | 47a768055357926ac5a92504cba83e7411c863fe /libgomp/testsuite/lib/libgomp.exp | |
parent | 9d73ec14be1b2537394f3b137ee4da016e031dac (diff) | |
download | gcc-d64ae6140f40859c0e73df7ca597cdf08eb31bd2.zip gcc-d64ae6140f40859c0e73df7ca597cdf08eb31bd2.tar.gz gcc-d64ae6140f40859c0e73df7ca597cdf08eb31bd2.tar.bz2 |
[PATCH 4/4] OpenMP 4.0 offloading to Intel MIC: non-fallback testing.
libgomp/
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Set up offload_additional_options,
offload_additional_lib_paths and offload_targets.
* testsuite/Makefile.am: Export environment variables: OFFLOAD_TARGETS,
OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS.
* testsuite/Makefile.in: Regenerate.
* testsuite/lib/libgomp.exp (libgomp_init): Append
offload_additional_lib_paths to LD_LIBRARY_PATH. Append
offload_additional_options to ALWAYS_CFLAGS. Append liboffloadmic
build directory to LD_LIBRARY_PATH for intelmic offload targets.
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
From-SVN: r217500
Diffstat (limited to 'libgomp/testsuite/lib/libgomp.exp')
-rw-r--r-- | libgomp/testsuite/lib/libgomp.exp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index 071e22f..a154684 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -107,6 +107,25 @@ 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 + if { [string match "*-intelmic-*" $offload_targets] + || [string match "*-intelmicemul-*" $offload_targets] } { + append always_ld_library_path ":${blddir}/../liboffloadmic/.libs" + append always_ld_library_path ":${blddir}/../liboffloadmic/plugin/.libs" + # libstdc++ is required by liboffloadmic + append always_ld_library_path ":${blddir}/../libstdc++-v3/src/.libs" + } + + if { $offload_additional_lib_paths != "" } { + append always_ld_library_path "${offload_additional_lib_paths}" + } + # Compute what needs to be added to the existing LD_LIBRARY_PATH. if {$gccdir != ""} { # Add AIX pthread directory first. @@ -169,6 +188,12 @@ proc libgomp_init { args } { # Disable color diagnostics lappend ALWAYS_CFLAGS "additional_flags=-fdiagnostics-color=never" + + # Used for support non-fallback offloading. + # Help GCC to find target mkoffload. + if { $offload_additional_options != "" } { + lappend ALWAYS_CFLAGS "additional_flags=${offload_additional_options}" + } } # |