diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-15 11:24:46 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-15 11:24:46 +0000 |
commit | 56fcd3fede0e1c4489a3c108d95fd1ff38dfa1a5 (patch) | |
tree | f21ec6dd55e434aff16e698b0286153465775d62 /libmudflap/testsuite/lib/libmudflap.exp | |
parent | c2ce85c4e04bda844aa35dfdf41e69e585d97b2e (diff) | |
download | gcc-56fcd3fede0e1c4489a3c108d95fd1ff38dfa1a5.tar.gz |
2009-07-15 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 149655
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@149682 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap/testsuite/lib/libmudflap.exp')
-rw-r--r-- | libmudflap/testsuite/lib/libmudflap.exp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/libmudflap/testsuite/lib/libmudflap.exp b/libmudflap/testsuite/lib/libmudflap.exp index da91643a7b2..c69e84ade29 100644 --- a/libmudflap/testsuite/lib/libmudflap.exp +++ b/libmudflap/testsuite/lib/libmudflap.exp @@ -60,9 +60,28 @@ proc libmudflap-init { language } { # set LD_LIBRARY_PATH so that libgcc_s, libstdc++ binaries can be found. # locate libgcc.a so we don't need to account for different values of # SHLIB_EXT on different platforms - set ld_library_path [find_libgcc_s $cxx] - add_path ld_library_path "${cxxblddir}/src/.libs" - add_path ld_library_path "${blddir}/.libs" + set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a] + if {$gccdir != ""} { + set gccdir [file dirname $gccdir] + } + + set ld_library_path "." + append ld_library_path ":${gccdir}" + append ld_library_path ":${cxxblddir}/src/.libs" + if {[is_remote host] == 0} { + foreach i "[exec ${gccdir}/xgcc --print-multi-lib]" { + set mldir "" + regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir + set mldir [string trimright $mldir "\;@"] + if { "$mldir" == "." } { + continue + } + if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } { + append ld_library_path ":${gccdir}/${mldir}" + } + } + } + append ld_library_path ":${blddir}/.libs" set libs "-L${blddir}/.libs" set cxxflags "-ggdb3 -DDEBUG_ASSERT" |