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 | |
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')
-rw-r--r-- | libgomp/testsuite/Makefile.am | 5 | ||||
-rw-r--r-- | libgomp/testsuite/Makefile.in | 8 | ||||
-rw-r--r-- | libgomp/testsuite/lib/libgomp.exp | 25 |
3 files changed, 38 insertions, 0 deletions
diff --git a/libgomp/testsuite/Makefile.am b/libgomp/testsuite/Makefile.am index 561b7e25448..9cc103a1c4d 100644 --- a/libgomp/testsuite/Makefile.am +++ b/libgomp/testsuite/Makefile.am @@ -11,3 +11,8 @@ 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) diff --git a/libgomp/testsuite/Makefile.in b/libgomp/testsuite/Makefile.in index 5273eaa2b35..2f845f0c7cb 100644 --- a/libgomp/testsuite/Makefile.in +++ b/libgomp/testsuite/Makefile.in @@ -184,6 +184,9 @@ lt_host_flags = @lt_host_flags@ mandir = @mandir@ mkdir_p = @mkdir_p@ multi_basedir = @multi_basedir@ +offload_additional_lib_paths = @offload_additional_lib_paths@ +offload_additional_options = @offload_additional_options@ +offload_targets = @offload_targets@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -408,6 +411,11 @@ 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: 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}" + } } # |