diff options
author | Diego Novillo <dnovillo@redhat.com> | 2005-04-01 17:16:04 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@redhat.com> | 2005-04-01 17:16:04 +0000 |
commit | 2c1b41938630950e8699a2cbae3088b9c179f809 (patch) | |
tree | f93745f2390682fcf3269662fee7c5e14bf0d2d1 /gcc/testsuite/lib/gcc-defs.exp | |
parent | 7b560836d28c028988edc3c1ccc7348bbfc91ac8 (diff) |
Merge mainline->tcb as of 2005-03-29.tree-cleanup-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/tree-cleanup-branch@97408 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/lib/gcc-defs.exp')
-rw-r--r-- | gcc/testsuite/lib/gcc-defs.exp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp index 87e8564e97a..c48b5399ac0 100644 --- a/gcc/testsuite/lib/gcc-defs.exp +++ b/gcc/testsuite/lib/gcc-defs.exp @@ -219,3 +219,35 @@ proc dg-additional-files-options { options source } { return $options } + +# Return a colon-separate list of directories to search for libraries +# for COMPILER, including multilib directories. + +proc gcc-set-multilib-library-path { compiler } { + global rootme + + # ??? rootme will not be set when testing an installed compiler. + # In that case, we should perhaps use some other method to find + # libraries. + if {![info exists rootme]} { + return "" + } + + set libpath ":${rootme}" + set compiler [lindex $compiler 0] + if { [is_remote host] == 0 && [which $compiler] != 0 } { + foreach i "[exec $compiler --print-multi-lib]" { + set mldir "" + regexp -- "\[a-z0-9=/\.-\]*;" $i mldir + set mldir [string trimright $mldir "\;@"] + if { "$mldir" == "." } { + continue + } + if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } { + append libpath ":${rootme}/${mldir}" + } + } + } + + return $libpath +} |