libmudflap.exp (libmudflap-init): Remove -static from MUDFLAP_FLAGS if static library not supported.
* 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. From-SVN: r107371
This commit is contained in:
parent
d998dd65ec
commit
68d67107ef
|
@ -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>
|
2005-10-04 James E Wilson <wilson@specifix.com>
|
||||||
|
|
||||||
* configure.ac (mudflap_cv_entry_point): Use quadrigraphs to declare
|
* configure.ac (mudflap_cv_entry_point): Use quadrigraphs to declare
|
||||||
|
|
|
@ -117,6 +117,28 @@ proc libmudflap-init { language } {
|
||||||
unset gluefile
|
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 } {
|
proc libmudflap-dg-test { prog do_what extra_tool_flags } {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
global MUDFLAP_FLAGS
|
||||||
|
set MUDFLAP_FLAGS [list {} {-static} { -O} {-O2} {-O3}]
|
||||||
|
|
||||||
libmudflap-init c++
|
libmudflap-init c++
|
||||||
if {$cxx == "g++"} then {
|
if {$cxx == "g++"} then {
|
||||||
|
@ -9,7 +11,7 @@ dg-init
|
||||||
|
|
||||||
global srcdir
|
global srcdir
|
||||||
|
|
||||||
foreach flags [list {} {-static} {-O} {-O2} {-O3}] {
|
foreach flags $MUDFLAP_FLAGS {
|
||||||
foreach srcfile [lsort [glob -nocomplain ${srcdir}/libmudflap.c++/*frag.cxx]] {
|
foreach srcfile [lsort [glob -nocomplain ${srcdir}/libmudflap.c++/*frag.cxx]] {
|
||||||
set bsrc [file tail $srcfile]
|
set bsrc [file tail $srcfile]
|
||||||
setenv MUDFLAP_OPTIONS "-viol-segv"
|
setenv MUDFLAP_OPTIONS "-viol-segv"
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
global MUDFLAP_FLAGS
|
||||||
|
set MUDFLAP_FLAGS [list {} {-static} {-O2} {-O3}]
|
||||||
|
|
||||||
libmudflap-init c++
|
libmudflap-init c++
|
||||||
if {$cxx == "g++"} then {
|
if {$cxx == "g++"} then {
|
||||||
|
@ -9,7 +11,7 @@ dg-init
|
||||||
|
|
||||||
global srcdir subdir
|
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 l1 [libmudflap_target_compile "$srcdir/$subdir/ctors-1.cxx" "ctors-1.o" object {additional_flags=-fmudflap}]
|
||||||
set test "ctors-1 compilation ${flags}"
|
set test "ctors-1 compilation ${flags}"
|
||||||
if [string match "*mudflap cannot track unknown size extern *k*" $l1] { pass $test } { fail $test }
|
if [string match "*mudflap cannot track unknown size extern *k*" $l1] { pass $test } { fail $test }
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
|
global MUDFLAP_FLAGS
|
||||||
|
set MUDFLAP_FLAGS [list {} {-static} {-O2} {-O3}]
|
||||||
|
|
||||||
libmudflap-init c
|
libmudflap-init c
|
||||||
|
|
||||||
dg-init
|
dg-init
|
||||||
|
|
||||||
global srcdir
|
global srcdir
|
||||||
foreach flags [list {} {-static} {-O2} {-O3}] {
|
foreach flags $MUDFLAP_FLAGS {
|
||||||
foreach srcfile [lsort [glob -nocomplain \
|
foreach srcfile [lsort [glob -nocomplain \
|
||||||
${srcdir}/libmudflap.c/*frag.c \
|
${srcdir}/libmudflap.c/*frag.c \
|
||||||
${srcdir}/libmudflap.c/heap*.c \
|
${srcdir}/libmudflap.c/heap*.c \
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
|
global MUDFLAP_FLAGS
|
||||||
|
set MUDFLAP_FLAGS [list {} {-static} {-O2} {-O3}]
|
||||||
|
|
||||||
libmudflap-init c
|
libmudflap-init c
|
||||||
dg-init
|
dg-init
|
||||||
|
|
||||||
global srcdir subdir
|
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 l1 [libmudflap_target_compile "$srcdir/$subdir/externs-1.c" "externs-1.o" object {additional_flags=-fmudflap}]
|
||||||
set test "externs-1 compilation ${flags}"
|
set test "externs-1 compilation ${flags}"
|
||||||
if [string match "*mudflap cannot track unknown size extern *d*" $l1] { pass $test } { fail $test }
|
if [string match "*mudflap cannot track unknown size extern *d*" $l1] { pass $test } { fail $test }
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
|
global MUDFLAP_FLAGS
|
||||||
|
set MUDFLAP_FLAGS [list {} {-static -DSTATIC} {-O2} {-O3}]
|
||||||
|
|
||||||
libmudflap-init c
|
libmudflap-init c
|
||||||
|
|
||||||
dg-init
|
dg-init
|
||||||
|
|
||||||
global srcdir
|
global srcdir
|
||||||
foreach flags [list {} {-static -DSTATIC} {-O2} {-O3}] {
|
foreach flags $MUDFLAP_FLAGS {
|
||||||
foreach srcfile [lsort [glob -nocomplain ${srcdir}/libmudflap.cth/*.c]] {
|
foreach srcfile [lsort [glob -nocomplain ${srcdir}/libmudflap.cth/*.c]] {
|
||||||
set bsrc [file tail $srcfile]
|
set bsrc [file tail $srcfile]
|
||||||
setenv MUDFLAP_OPTIONS "-viol-segv"
|
setenv MUDFLAP_OPTIONS "-viol-segv"
|
||||||
|
|
Loading…
Reference in New Issue