summaryrefslogtreecommitdiff
path: root/libmudflap
diff options
context:
space:
mode:
authorfche <fche@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-17 20:34:19 +0000
committerfche <fche@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-17 20:34:19 +0000
commitbe8a81605eb5eb301e4f4663f04eca8f0c6a53d3 (patch)
tree4f4b2d2474d6c9f857a08c14e9b579c55282ce18 /libmudflap
parent0c211281f15f2484260786677fd42c1b907135de (diff)
downloadgcc-be8a81605eb5eb301e4f4663f04eca8f0c6a53d3.tar.gz
2004-05-17 Frank Ch. Eigler <fche@redhat.com>
* lib/libmudflap.exp (libmudflap-init): For C++ test cases only, import some build settings from libstdc++-v3 testsuite_flags. * .../cfrags.exp, .../c++frags.exp, .../cthfrags.exp: Corresponding changes to pass test language. * mf-runtime.c (__mfu_check): Poison the cache with antidote for quicker mode-nop handling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81944 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap')
-rw-r--r--libmudflap/ChangeLog10
-rw-r--r--libmudflap/mf-runtime.c2
-rw-r--r--libmudflap/testsuite/lib/libmudflap.exp37
-rw-r--r--libmudflap/testsuite/libmudflap.c++/c++frags.exp2
-rw-r--r--libmudflap/testsuite/libmudflap.c/cfrags.exp2
-rw-r--r--libmudflap/testsuite/libmudflap.cth/cthfrags.exp2
6 files changed, 43 insertions, 12 deletions
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog
index eafa5eb3e57..4ae37839b82 100644
--- a/libmudflap/ChangeLog
+++ b/libmudflap/ChangeLog
@@ -1,3 +1,13 @@
+2004-05-17 Frank Ch. Eigler <fche@redhat.com>
+
+ * lib/libmudflap.exp (libmudflap-init): For C++ test cases only,
+ import some build settings from libstdc++-v3 testsuite_flags.
+ * .../cfrags.exp, .../c++frags.exp, .../cthfrags.exp: Corresponding
+ changes to pass test language.
+
+ * mf-runtime.c (__mfu_check): Poison the cache with antidote for
+ quicker mode-nop handling.
+
2004-03-25 Frank Ch. Eigler <fche@redhat.com>
* mf-impl.h: Added libgcc license header.
diff --git a/libmudflap/mf-runtime.c b/libmudflap/mf-runtime.c
index 88a3682081c..8d5ed8c3665 100644
--- a/libmudflap/mf-runtime.c
+++ b/libmudflap/mf-runtime.c
@@ -737,6 +737,8 @@ void __mfu_check (void *ptr, size_t sz, int type, const char *location)
switch (__mf_opts.mudflap_mode)
{
case mode_nop:
+ entry->low = MINPTR;
+ entry->high = MAXPTR;
judgement = 1;
break;
diff --git a/libmudflap/testsuite/lib/libmudflap.exp b/libmudflap/testsuite/lib/libmudflap.exp
index 1d1e22ffb28..4e482ecbcd2 100644
--- a/libmudflap/testsuite/lib/libmudflap.exp
+++ b/libmudflap/testsuite/lib/libmudflap.exp
@@ -21,7 +21,7 @@
load_lib mfdg.exp
load_lib libgloss.exp
-proc libmudflap-init { compiler } {
+proc libmudflap-init { language } {
global srcdir
global outdir
global blddir
@@ -34,9 +34,17 @@ proc libmudflap-init { compiler } {
global ld_library_path
global tool_root_dir
- verbose "libmudflap-init $compiler"
+ switch $language {
+ "c" { set cxx [find_gcc] }
+ "c++" { set cxx [find_g++] }
+ default { error "bad language code $language"; return }
+ }
+
+ verbose -log "libmudflap-init $cxx"
set blddir [lookfor_file [get_multilibs] libmudflap]
+ set cxxblddir [lookfor_file [get_multilibs] libstdc++-v3]
+ set cxxflags_file "${cxxblddir}/scripts/testsuite_flags"
# By default, we assume we want to run program images.
global dg-do-what-default
@@ -52,7 +60,7 @@ proc libmudflap-init { compiler } {
set ld_library_path "."
append ld_library_path ":${gccdir}"
- append ld_library_path ":../../libstdc++-v3/src/.libs"
+ append ld_library_path ":${cxxblddir}/src/.libs"
if {[is_remote host] == 0} {
foreach i "[exec ${gccdir}/xgcc --print-multi-lib]" {
set mldir ""
@@ -63,17 +71,28 @@ proc libmudflap-init { compiler } {
}
if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] == 1 } {
append ld_library_path ":${gccdir}/${mldir}"
- append ld_library_path ":../../libstdc++-v3/${mldir}/src/.libs"
}
}
}
append ld_library_path ":${blddir}/.libs"
- set cxx $compiler
- set libs "-L../.libs -L../../libstdc++-v3/src/.libs -L../../../gcc"
+
+ set libs "-L../.libs -L../../../gcc"
set cxxflags "-ggdb3 -DDEBUG_ASSERT"
set includes "-I${srcdir} -I.."
- verbose "ld_library_path=$ld_library_path"
+ if {$language == "c++"} {
+ if {[file exists $cxxflags_file]} then {
+ set includes "${includes} [exec sh $cxxflags_file --build-includes]"
+ set cxxflags "${cxxflags} [exec sh $cxxflags_file --cxxflags]"
+ # c++ libs are included by --build-cxx below
+ set cxx "[exec sh $cxxflags_file --build-cxx]"
+ } else {
+ lappend libs "-L../../libstdc++-v3/src/.libs"
+ lappend includes "-I../../libstdc++-v3/include"
+ }
+ }
+
+ verbose -log "ld_library_path=$ld_library_path"
setenv LD_LIBRARY_PATH $ld_library_path
setenv SHLIB_PATH $ld_library_path
setenv LD_LIBRARYN32_PATH $ld_library_path
@@ -212,9 +231,9 @@ proc libmudflap-list-sourcefiles { } {
set res {}
foreach w $sfiles {
if [regexp "wchar_t" $w] {
- verbose "element out list is $w"
+ verbose -log "element out list is $w"
} else {
- verbose "element in list is $w"
+ verbose -log "element in list is $w"
lappend res $w
}
}
diff --git a/libmudflap/testsuite/libmudflap.c++/c++frags.exp b/libmudflap/testsuite/libmudflap.c++/c++frags.exp
index 5d8be05245c..659494b3e00 100644
--- a/libmudflap/testsuite/libmudflap.c++/c++frags.exp
+++ b/libmudflap/testsuite/libmudflap.c++/c++frags.exp
@@ -1,5 +1,5 @@
-libmudflap-init [find_g++]
+libmudflap-init c++
dg-init
diff --git a/libmudflap/testsuite/libmudflap.c/cfrags.exp b/libmudflap/testsuite/libmudflap.c/cfrags.exp
index bef2f91c312..2d6132bf931 100644
--- a/libmudflap/testsuite/libmudflap.c/cfrags.exp
+++ b/libmudflap/testsuite/libmudflap.c/cfrags.exp
@@ -1,5 +1,5 @@
-libmudflap-init [find_gcc]
+libmudflap-init c
dg-init
diff --git a/libmudflap/testsuite/libmudflap.cth/cthfrags.exp b/libmudflap/testsuite/libmudflap.cth/cthfrags.exp
index 508d8eced10..3431965dd62 100644
--- a/libmudflap/testsuite/libmudflap.cth/cthfrags.exp
+++ b/libmudflap/testsuite/libmudflap.cth/cthfrags.exp
@@ -1,5 +1,5 @@
-libmudflap-init [find_gcc]
+libmudflap-init c
dg-init