Commit 93cc82d1 by Paolo Carlini Committed by Paolo Carlini

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
parent 88e2c810
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.
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment