diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2008-07-31 18:43:08 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2008-07-31 18:43:08 +0000 |
commit | 93cc82d1f3d649ad736c07396f711c9f09e67dbd (patch) | |
tree | b2d499bda3d6d9e465c9a06f32f9268113cbbcc8 | |
parent | 88e2c8107b5faaa2b2bee01ee6e6f51522b4e5dd (diff) | |
download | gcc-93cc82d1f3d649ad736c07396f711c9f09e67dbd.zip gcc-93cc82d1f3d649ad736c07396f711c9f09e67dbd.tar.gz gcc-93cc82d1f3d649ad736c07396f711c9f09e67dbd.tar.bz2 |
libstdc++.exp (libstdc++_init): Set v3-libgomp.
2008-07-31 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (libstdc++_init): Set v3-libgomp.
(check_v3_target_parallel_mode): Robustify, just follow the
structure of testsuite/Makefile.am.
From-SVN: r138428
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/lib/libstdc++.exp | 31 |
2 files changed, 13 insertions, 24 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8c90e3a..93892d1 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2008-07-31 Paolo Carlini <paolo.carlini@oracle.com> + + * testsuite/lib/libstdc++.exp (libstdc++_init): Set v3-libgomp. + (check_v3_target_parallel_mode): Robustify, just follow the + structure of testsuite/Makefile.am. + 2008-07-29 Paolo Carlini <paolo.carlini@oracle.com> * include/debug/set.h: Minor formatting fixes. diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index afcaa19..9412ce9 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -81,7 +81,7 @@ proc v3-copy-files {srcfiles} { # Called once, during runtest.exp setup. proc libstdc++_init { testfile } { global env - global v3-sharedlib + global v3-sharedlib v3-libgomp global srcdir blddir objdir tool_root_dir global cc cxx cxxflags cxxpchflags cxxldflags global includes @@ -135,10 +135,13 @@ proc libstdc++_init { testfile } { v3track gccdir 3 # Locate libgomp. This is only required for parallel mode. + set v3-libgomp 0 set libgompdir [lookfor_file $blddir/../libgomp .libs/libgomp.so] if {$libgompdir != ""} { + set v3-libgomp 1 set libgompdir [file dirname $libgompdir] append ld_library_path_tmp ":${libgompdir}" + verbose -log "libgomp support detected" } v3track libgompdir 3 @@ -968,7 +971,7 @@ proc check_v3_target_debug_mode { } { proc check_v3_target_parallel_mode { } { global cxxflags - global DEFAULT_CXXFLAGS + global v3-libgomp global et_parallel_mode global tool @@ -993,29 +996,9 @@ proc check_v3_target_parallel_mode { } { } else { set et_parallel_mode 0 - # Set up and compile a C++ test program that depends - # on parallel mode working. - set src parallel_mode[pid].cc - set exe parallel_mode[pid].exe - - set f [open $src "w"] - puts $f "#include <omp.h>" - puts $f "int main()" - puts $f "{ return 0; }" - close $f - - set cxxflags_saved $cxxflags - set cxxflags "$cxxflags $DEFAULT_CXXFLAGS -Werror" - - set lines [v3_target_compile $src $exe executable ""] - set cxxflags $cxxflags_saved - file delete $src - - if [string match "" $lines] { - # No error message, compilation succeeded. + # If 'make check-parallel' is running the test succeeds. + if { ${v3-libgomp} == 1 && [regexp "libgomp" $cxxflags] } { set et_parallel_mode 1 - } else { - verbose "check_v3_target_parallel_mode: compilation failed" 2 } } verbose "check_v3_target_parallel_mode: $et_parallel_mode" 2 |