diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-21 02:58:24 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-21 02:58:24 +0000 |
commit | 9bd65cc14e7a88096f4c0020d6d0ff7202ad9ed8 (patch) | |
tree | 79aa17e9554a7a4348ad6284dbfbb90359769fe9 /gcc/testsuite/lib | |
parent | a6e6eeae4ec5a01b345d62681f637526ef5ccf8d (diff) | |
download | gcc-9bd65cc14e7a88096f4c0020d6d0ff7202ad9ed8.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78206 138bc75d-0d04-0410-961f-82ee72b054a4
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 c6776679389..c5f589eea27 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 33d72fd9520..173ce6128d3 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. |