diff options
author | janis <janis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-22 20:35:51 +0000 |
---|---|---|
committer | janis <janis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-22 20:35:51 +0000 |
commit | 50516bc34e63978c5f92d31390aebefd79cbc4b5 (patch) | |
tree | d5c4c88db432b79ac6a1569295a4c72df2098e33 | |
parent | 8aa776bebd9a4d6e485c99e5e8ca9d5ddedc3f2c (diff) | |
download | gcc-50516bc34e63978c5f92d31390aebefd79cbc4b5.tar.gz |
* testsuite/lib/libmudflap.exp (libmudflap-init): Remove -static from
MUDFLAP_FLAGS if static library not supported.
* testsuite/libmudflap.c/cfrags.exp (MUDFLAP_FLAGS): new.
* testsuite/libmudflap.c/externs.exp: Ditto.
* testsuite/libmudflap.c++/ctors.exp: Ditto.
* testsuite/libmudflap.c++/c++frags.exp: Ditto.
* testsuite/libmudflap.cth/cthfrags.exp: Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107371 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libmudflap/ChangeLog | 10 | ||||
-rw-r--r-- | libmudflap/testsuite/lib/libmudflap.exp | 22 | ||||
-rw-r--r-- | libmudflap/testsuite/libmudflap.c++/c++frags.exp | 4 | ||||
-rw-r--r-- | libmudflap/testsuite/libmudflap.c++/ctors.exp | 4 | ||||
-rw-r--r-- | libmudflap/testsuite/libmudflap.c/cfrags.exp | 4 | ||||
-rw-r--r-- | libmudflap/testsuite/libmudflap.c/externs.exp | 5 | ||||
-rw-r--r-- | libmudflap/testsuite/libmudflap.cth/cthfrags.exp | 4 |
7 files changed, 48 insertions, 5 deletions
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index 306342adddc..d7819e932b8 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -1,3 +1,13 @@ +2005-11-22 Janis Johnson <janis187@us.ibm.com> + + * testsuite/lib/libmudflap.exp (libmudflap-init): Remove -static from + MUDFLAP_FLAGS if static library not supported. + * testsuite/libmudflap.c/cfrags.exp (MUDFLAP_FLAGS): new. + * testsuite/libmudflap.c/externs.exp: Ditto. + * testsuite/libmudflap.c++/ctors.exp: Ditto. + * testsuite/libmudflap.c++/c++frags.exp: Ditto. + * testsuite/libmudflap.cth/cthfrags.exp: Ditto. + 2005-10-04 James E Wilson <wilson@specifix.com> * configure.ac (mudflap_cv_entry_point): Use quadrigraphs to declare diff --git a/libmudflap/testsuite/lib/libmudflap.exp b/libmudflap/testsuite/lib/libmudflap.exp index 634f1cb28ad..e08f13d25ef 100644 --- a/libmudflap/testsuite/lib/libmudflap.exp +++ b/libmudflap/testsuite/lib/libmudflap.exp @@ -117,6 +117,28 @@ proc libmudflap-init { language } { unset gluefile } } + + # If there is no static library then don't run tests with -static. + global tool + set opts "additional_flags=-static" + lappend opts "additional_flags=-fmudflap" + lappend opts "additional_flags=-lmudflap" + set src stlm[pid].c + set exe stlm[pid].x + + set f [open $src "w"] + puts $f "int main () { }" + close $f + set lines [${tool}_target_compile $src $exe executable "$opts"] + file delete $src + remote_file build delete $exe + + if { ![string match "" $lines] } { + # Compilation failed; assume static library is not available. + global MUDFLAP_FLAGS + set i [lsearch $MUDFLAP_FLAGS "*static*"] + set MUDFLAP_FLAGS [lreplace $MUDFLAP_FLAGS $i $i] + } } proc libmudflap-dg-test { prog do_what extra_tool_flags } { diff --git a/libmudflap/testsuite/libmudflap.c++/c++frags.exp b/libmudflap/testsuite/libmudflap.c++/c++frags.exp index 0b2774360b7..eb900d79911 100644 --- a/libmudflap/testsuite/libmudflap.c++/c++frags.exp +++ b/libmudflap/testsuite/libmudflap.c++/c++frags.exp @@ -1,3 +1,5 @@ +global MUDFLAP_FLAGS +set MUDFLAP_FLAGS [list {} {-static} { -O} {-O2} {-O3}] libmudflap-init c++ if {$cxx == "g++"} then { @@ -9,7 +11,7 @@ dg-init global srcdir -foreach flags [list {} {-static} {-O} {-O2} {-O3}] { +foreach flags $MUDFLAP_FLAGS { foreach srcfile [lsort [glob -nocomplain ${srcdir}/libmudflap.c++/*frag.cxx]] { set bsrc [file tail $srcfile] setenv MUDFLAP_OPTIONS "-viol-segv" diff --git a/libmudflap/testsuite/libmudflap.c++/ctors.exp b/libmudflap/testsuite/libmudflap.c++/ctors.exp index ceb9fb70ffa..b3dda8fd6ec 100644 --- a/libmudflap/testsuite/libmudflap.c++/ctors.exp +++ b/libmudflap/testsuite/libmudflap.c++/ctors.exp @@ -1,3 +1,5 @@ +global MUDFLAP_FLAGS +set MUDFLAP_FLAGS [list {} {-static} {-O2} {-O3}] libmudflap-init c++ if {$cxx == "g++"} then { @@ -9,7 +11,7 @@ dg-init global srcdir subdir -foreach flags [list {} {-static} {-O2} {-O3}] { +foreach flags $MUDFLAP_FLAGS { set l1 [libmudflap_target_compile "$srcdir/$subdir/ctors-1.cxx" "ctors-1.o" object {additional_flags=-fmudflap}] set test "ctors-1 compilation ${flags}" if [string match "*mudflap cannot track unknown size extern *k*" $l1] { pass $test } { fail $test } diff --git a/libmudflap/testsuite/libmudflap.c/cfrags.exp b/libmudflap/testsuite/libmudflap.c/cfrags.exp index 577a4cc80c9..bdaf2196cb7 100644 --- a/libmudflap/testsuite/libmudflap.c/cfrags.exp +++ b/libmudflap/testsuite/libmudflap.c/cfrags.exp @@ -1,10 +1,12 @@ +global MUDFLAP_FLAGS +set MUDFLAP_FLAGS [list {} {-static} {-O2} {-O3}] libmudflap-init c dg-init global srcdir -foreach flags [list {} {-static} {-O2} {-O3}] { +foreach flags $MUDFLAP_FLAGS { foreach srcfile [lsort [glob -nocomplain \ ${srcdir}/libmudflap.c/*frag.c \ ${srcdir}/libmudflap.c/heap*.c \ diff --git a/libmudflap/testsuite/libmudflap.c/externs.exp b/libmudflap/testsuite/libmudflap.c/externs.exp index e97e0b684e4..773f80cc12a 100644 --- a/libmudflap/testsuite/libmudflap.c/externs.exp +++ b/libmudflap/testsuite/libmudflap.c/externs.exp @@ -1,9 +1,12 @@ +global MUDFLAP_FLAGS +set MUDFLAP_FLAGS [list {} {-static} {-O2} {-O3}] + libmudflap-init c dg-init global srcdir subdir -foreach flags [list {} {-static} {-O2} {-O3}] { +foreach flags $MUDFLAP_FLAGS { set l1 [libmudflap_target_compile "$srcdir/$subdir/externs-1.c" "externs-1.o" object {additional_flags=-fmudflap}] set test "externs-1 compilation ${flags}" if [string match "*mudflap cannot track unknown size extern *d*" $l1] { pass $test } { fail $test } diff --git a/libmudflap/testsuite/libmudflap.cth/cthfrags.exp b/libmudflap/testsuite/libmudflap.cth/cthfrags.exp index 54dd2c34733..e5a7de84354 100644 --- a/libmudflap/testsuite/libmudflap.cth/cthfrags.exp +++ b/libmudflap/testsuite/libmudflap.cth/cthfrags.exp @@ -1,10 +1,12 @@ +global MUDFLAP_FLAGS +set MUDFLAP_FLAGS [list {} {-static -DSTATIC} {-O2} {-O3}] libmudflap-init c dg-init global srcdir -foreach flags [list {} {-static -DSTATIC} {-O2} {-O3}] { +foreach flags $MUDFLAP_FLAGS { foreach srcfile [lsort [glob -nocomplain ${srcdir}/libmudflap.cth/*.c]] { set bsrc [file tail $srcfile] setenv MUDFLAP_OPTIONS "-viol-segv" |