diff options
author | kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-13 14:07:09 +0000 |
---|---|---|
committer | kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-13 14:07:09 +0000 |
commit | ba0f7503b1506ba6603a299d52deb8bffa231e07 (patch) | |
tree | 47a768055357926ac5a92504cba83e7411c863fe /libgomp/testsuite/lib/libgomp.exp | |
parent | 30cc6b51813c13149464f157f06e7fce685a41b2 (diff) | |
download | gcc-ba0f7503b1506ba6603a299d52deb8bffa231e07.tar.gz |
[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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217500 138bc75d-0d04-0410-961f-82ee72b054a4
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 071e22fbf30..a1546847323 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}" + } } # |