diff options
| author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-16 20:54:45 +0000 |
|---|---|---|
| committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-16 20:54:45 +0000 |
| commit | 4344dc70fd9edcecff1a981e86224dca593bb19e (patch) | |
| tree | 5e25eb5e82415bf2b8d8bb2666d3b443886ec001 /libjava/testsuite | |
| parent | e728810380e46abe9685081580b48df5c692db29 (diff) | |
| download | ppe42-gcc-4344dc70fd9edcecff1a981e86224dca593bb19e.tar.gz ppe42-gcc-4344dc70fd9edcecff1a981e86224dca593bb19e.zip | |
* lib/libjava.exp (libjava_arguments): Rewrote computation of
LD_LIBRARY_PATH. Add gcc build directory if it contains
libgcc_s.so.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40564 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/testsuite')
| -rw-r--r-- | libjava/testsuite/ChangeLog | 6 | ||||
| -rw-r--r-- | libjava/testsuite/lib/libjava.exp | 31 |
2 files changed, 27 insertions, 10 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog index 223a614dc6e..fc6036be62f 100644 --- a/libjava/testsuite/ChangeLog +++ b/libjava/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2001-03-16 Tom Tromey <tromey@redhat.com> + + * lib/libjava.exp (libjava_arguments): Rewrote computation of + LD_LIBRARY_PATH. Add gcc build directory if it contains + libgcc_s.so. + 2001-03-14 Tom Tromey <tromey@redhat.com> * libjava.compile/assignment.xfail: Removed. diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp index 101871e9055..14be4749946 100644 --- a/libjava/testsuite/lib/libjava.exp +++ b/libjava/testsuite/lib/libjava.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1998, 1999, 2000 Free Software Foundation +# Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation load_lib "libgloss.exp" @@ -192,6 +192,7 @@ proc libjava_arguments {{mode compile}} { global tmpdir global runtests global env + global tool_root_dir if [info exists LIBJAVA] { set libjava $LIBJAVA; @@ -230,17 +231,25 @@ proc libjava_arguments {{mode compile}} { # Basically we want to build up a colon separated path list from # the value of $libjava. - # First strip away any -L arguments. - regsub -all -- "-L" $libjava "" ld_library_path - - # Then remove any -lgcj argument. - regsub -all -- " -lgcj.*" $ld_library_path "" ld_library_path + set lpath {} + foreach dir [list $libjava $libgc $libz] { + foreach item [split $dir " "] { + switch -glob -- $item { + "-L*" { + lappend lpath [string range $item 2 end] + } + } + } + } - # First strip away any -L arguments. - regsub -all -- "-L" $libgc $ld_library_path ld_library_path + # 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] + } - # Then remove any -lgcjgc argument. - regsub -all -- " -lgcjgc.*" $ld_library_path "" ld_library_path + set ld_library_path [join $lpath :] # That's enough to make things work for the normal case. # If we wanted to handle an arbitrary value of libjava, @@ -251,6 +260,8 @@ proc libjava_arguments {{mode compile}} { setenv LD_LIBRARY_PATH "$ld_library_path:$original_ld_library_path" setenv SHLIB_PATH "$ld_library_path:$original_ld_library_path" + verbose "LD_LIBRARY_PATH = $env(LD_LIBRARY_PATH)" + # Set the CLASSPATH environment variable verbose "CLASSPATH is .:$srcdir/$subdir:$objdir:$objdir/../libgcj.jar" global env |

