libstdc++.exp [...]: Use remote_file delete for generated exe.
2010-11-26 François Dumont <francois.cppdevs@free.fr> * testsuite/lib/libstdc++.exp [check_v3_target_debug_mode]: Use remote_file delete for generated exe. [check_v3_target_profile_mode] Add. * testsuite/lib/dg-options.exp [dg-require-profile-mode]: Add * testsuite/ext/profile/mh.cc, profiler_algos.cc, all.cc: Use dg-require-profile-mode, remove explicit _GLIBCXX_PROFILE definition. From-SVN: r167188
This commit is contained in:
parent
556618c1b3
commit
bcd93c00ab
|
@ -1,3 +1,12 @@
|
|||
2010-11-26 François Dumont <francois.cppdevs@free.fr>
|
||||
|
||||
* testsuite/lib/libstdc++.exp [check_v3_target_debug_mode]: Use
|
||||
remote_file delete for generated exe. [check_v3_target_profile_mode]
|
||||
Add.
|
||||
* testsuite/lib/dg-options.exp [dg-require-profile-mode]: Add
|
||||
* testsuite/ext/profile/mh.cc, profiler_algos.cc, all.cc: Use
|
||||
dg-require-profile-mode, remove explicit _GLIBCXX_PROFILE definition.
|
||||
|
||||
2010-11-25 François Dumont <francois.cppdevs@free.fr>
|
||||
|
||||
* src/debug.cc: Introduce a mutex pool in get_safe_base_mutex.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// { dg-options "-std=gnu++0x -O0 -D_GLIBCXX_PROFILE" }
|
||||
// { dg-options "-std=gnu++0x -O0 -D_GLIBCXX_PROFILE -D_GLIBCXX_PROFILE_NO_THREADS" { target { ! tls_native } } }
|
||||
// { dg-require-profile-mode "" }
|
||||
// { dg-options "-std=gnu++0x -O0" }
|
||||
// { dg-options "-std=gnu++0x -O0 -D_GLIBCXX_PROFILE_NO_THREADS" { target { ! tls_native } } }
|
||||
// { dg-do compile }
|
||||
|
||||
// -*- C++ -*-
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// { dg-options "-D_GLIBCXX_PROFILE" }
|
||||
// { dg-require-profile-mode "" }
|
||||
// { dg-do compile { target *-*-linux* } }
|
||||
// { dg-xfail-if "" { uclibc } { "*" } { "" } }
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// { dg-options "-D_GLIBCXX_PROFILE" }
|
||||
// { dg-require-profile-mode "" }
|
||||
|
||||
// -*- C++ -*-
|
||||
|
||||
|
|
|
@ -35,6 +35,15 @@ proc dg-require-debug-mode { args } {
|
|||
return
|
||||
}
|
||||
|
||||
proc dg-require-profile-mode { args } {
|
||||
if { ![ check_v3_target_profile_mode ] } {
|
||||
upvar dg-do-what dg-do-what
|
||||
set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
proc dg-require-normal-mode { args } {
|
||||
if { ![ check_v3_target_normal_mode ] } {
|
||||
upvar dg-do-what dg-do-what
|
||||
|
|
|
@ -935,7 +935,7 @@ proc check_v3_target_debug_mode { } {
|
|||
|
||||
if [string match "" $lines] {
|
||||
# No error message, compilation succeeded.
|
||||
file delete $exe
|
||||
remote_file build delete $exe
|
||||
set et_debug_mode 1
|
||||
}
|
||||
}
|
||||
|
@ -943,6 +943,56 @@ proc check_v3_target_debug_mode { } {
|
|||
return $et_debug_mode
|
||||
}
|
||||
|
||||
proc check_v3_target_profile_mode { } {
|
||||
global et_profile_mode
|
||||
global tool
|
||||
|
||||
if { ![info exists et_profile_mode_target_name] } {
|
||||
set et_profile_mode_target_name ""
|
||||
}
|
||||
|
||||
# If the target has changed since we set the cached value, clear it.
|
||||
set current_target [current_target_name]
|
||||
if { $current_target != $et_profile_mode_target_name } {
|
||||
verbose "check_v3_target_profile_mode: `$et_profile_mode_target_name'" 2
|
||||
set et_profile_mode_target_name $current_target
|
||||
if [info exists et_profile_mode] {
|
||||
verbose "check_v3_target_profile_mode: removing cached result" 2
|
||||
unset et_profile_mode
|
||||
}
|
||||
}
|
||||
|
||||
if [info exists et_profile_mode] {
|
||||
verbose "check_v3_target_profile_mode: using cached result" 2
|
||||
} else {
|
||||
set et_profile_mode 0
|
||||
|
||||
# Set up and compile a C++ test program that depends
|
||||
# on profile mode activated.
|
||||
set src profile_mode[pid].cc
|
||||
set exe profile_mode[pid].exe
|
||||
|
||||
set f [open $src "w"]
|
||||
puts $f "#ifndef _GLIBCXX_PROFILE"
|
||||
puts $f "# error No profile mode"
|
||||
puts $f "#endif"
|
||||
puts $f "int main()"
|
||||
puts $f "{ return 0; }"
|
||||
close $f
|
||||
|
||||
set lines [v3_target_compile $src $exe executable ""]
|
||||
file delete $src
|
||||
|
||||
if [string match "" $lines] {
|
||||
# No error message, compilation succeeded.
|
||||
remote_file build delete $exe
|
||||
set et_profile_mode 1
|
||||
}
|
||||
}
|
||||
verbose "check_v3_target_profile_mode: $et_profile_mode" 2
|
||||
return $et_profile_mode
|
||||
}
|
||||
|
||||
proc check_v3_target_normal_mode { } {
|
||||
global et_normal_mode
|
||||
global tool
|
||||
|
|
Loading…
Reference in New Issue