diff options
Diffstat (limited to 'libjava')
| -rw-r--r-- | libjava/ChangeLog | 6 | ||||
| -rw-r--r-- | libjava/testsuite/lib/libjava.exp | 34 |
2 files changed, 33 insertions, 7 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index f507bd1..3827474 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2002-05-09 Jakub Jelinek <jakub@redhat.com> + + * testsuite/lib/libjava.exp (libjava_arguments): Append all + multilib dirs containing libgcc_s*.so.1 below gcc object dir to + LD_LIBRARY_PATH. + 2002-05-08 Mark Mitchell <mark@codesourcery.com> * libjava/Makefile.am (all_java_source_files): New variable. diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp index 4717c06..8f1f829 100644 --- a/libjava/testsuite/lib/libjava.exp +++ b/libjava/testsuite/lib/libjava.exp @@ -113,6 +113,8 @@ proc libjava_init { args } { global original_ld_library_path global env objdir global env gcc_version + global tool_root_dir + global libjava_libgcc_s_path if { $libjava_initialized == 1 } { return; } @@ -170,6 +172,29 @@ proc libjava_init { args } { } } + # Finally, add the gcc build directory so that we can find the + # shared libgcc. This, like much of dejagnu, is hideous. + set libjava_libgcc_s_path {} + set gccdir [lookfor_file $tool_root_dir gcc/libgcc_s.so] + if {$gccdir != ""} { + set gccdir [file dirname $gccdir] + lappend libjava_libgcc_s_path $gccdir + set compiler ${gccdir}/xgcc + 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 ${gccdir}/${mldir}/libgcc_s*.so.*]] == 1 } { + lappend libjava_libgcc_s_path "${gccdir}/${mldir}" + } + } + } + } + set libjava_initialized 1 } @@ -252,6 +277,7 @@ proc libjava_arguments {{mode compile}} { global env global tool_root_dir global gcc_version + global libjava_libgcc_s_path if [info exists LIBJAVA] { set libjava $LIBJAVA; @@ -301,13 +327,7 @@ proc libjava_arguments {{mode compile}} { } } - # Finally, add the gcc build directory so that we can find the - # shared libgcc. This, like much of dejagnu, is hideous. - set gccdir [lookfor_file $tool_root_dir gcc/libgcc_s.so] - if {$gccdir != ""} { - lappend lpath [file dirname $gccdir] - } - + set lpath [concat $lpath $libjava_libgcc_s_path] set ld_library_path [join $lpath :] # That's enough to make things work for the normal case. |
