diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2004-02-21 02:58:24 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2004-02-21 02:58:24 +0000 |
commit | 0d856ba2d26b6baa58932c461952f1abc6275082 (patch) | |
tree | 79aa17e9554a7a4348ad6284dbfbb90359769fe9 /gcc/testsuite/lib | |
parent | d220de0ed226524460e398c80a580e0dc74b420f (diff) | |
download | gcc-0d856ba2d26b6baa58932c461952f1abc6275082.zip gcc-0d856ba2d26b6baa58932c461952f1abc6275082.tar.gz gcc-0d856ba2d26b6baa58932c461952f1abc6275082.tar.bz2 |
target-supports.exp (check_profiling_available): Check argument to determine whether we support a profiling type.
* lib/target-supports.exp (check_profiling_available): Check
argument to determine whether we support a profiling type.
* lib/gcc-dg.exp (dg-require-profiling): Pass argument to
check_profiling_available.
* g++.dg/bprob/bprob.exp: Likewise
* g77.dg/bprob/bprob.exp: Likewise.
* gcc.misc-tests/bprob.exp: Likewise.
* g++.old-deja/g++.law/profile1.C: Pass profiling type to
dg-require-profiling and delete expected error handling.
* gcc.dg/20021014-1.c: Likewise.
* gcc.dg/nest.c: Likewise.
From-SVN: r78206
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r-- | gcc/testsuite/lib/gcc-dg.exp | 2 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 25 |
2 files changed, 25 insertions, 2 deletions
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index c677667..c5f589e 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -324,7 +324,7 @@ proc dg-require-gc-sections { args } { # If this target does not support profiling, skip this test. proc dg-require-profiling { args } { - if { ![ check_profiling_available ] } { + if { ![ check_profiling_available ${args} ] } { upvar dg-do-what dg-do-what set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] return diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 33d72fd..173ce61 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -166,9 +166,32 @@ proc check_gc_sections_available { } { # Return true if profiling is supported on the target. -proc check_profiling_available { } { +proc check_profiling_available { test_what } { global profiling_available_saved + verbose "Profiling argument is <$test_what>" 1 + + # These conditions depend on the argument so examine them before + # looking at the cache variable. + + # Support for -p on solaris2 relies on mcrt1.o which comes with the + # vendor compiler. We cannot reliably predict the directory where the + # vendor compiler (and thus mcrt1.o) is installed so we can't + # necessarily find mcrt1.o even if we have it. + if { [istarget *-*-solaris2*] && [lindex $test_what 1] == "-p" } { + return 0 + } + + # Support for -p on irix relies on libprof1.a which doesn't appear to + # exist on any irix6 system currently posting testsuite results. + # Support for -pg on irix relies on gcrt1.o which doesn't exist yet. + # See: http://gcc.gnu.org/ml/gcc/2002-10/msg00169.html + if { [istarget mips*-*-irix*] + && ([lindex $test_what 1] == "-p" || [lindex $test_what 1] == "-pg") } { + return 0 + } + + # Now examine the cache variable. if {![info exists profiling_available_saved]} { # Some targets don't have any implementation of __bb_init_func or are # missing other needed machinery. |