summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-09 21:01:55 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-09 21:01:55 +0000
commit6af61abe034ab1a1025075ea23b7cff888cefbe4 (patch)
tree90b85aa28a1ca0a270f78459d62ab64da5663ee3 /libjava
parente2b723cab4f7cddd4a083cd2daa0e371950f48f8 (diff)
downloadgcc-6af61abe034ab1a1025075ea23b7cff888cefbe4.tar.gz
PR target/6429
* Makefile.in (libgcc.mk): Pass SHLIB_SLIBDIR_SUFFIXES to mklibgcc. * mklibgcc.in: If SHLIB_SLIBDIR_SUFFIXES is defined, put libgcc_s shared libraries into multilib dirs, with SONAME libgcc_s.so.1 for base multilibs. * config/t-slibgcc-elf-ver (SHLIB_LINK): Adjust for the above. * config/t-slibgcc-sld (SHLIB_LINK): Likewise. * config/i386/t-linux64 (SHLIB_SLIBDIR_SUFFIXES): Define. * config/sparc/t-linux64 (SHLIB_SLIBDIR_SUFFIXES): Define. * config/sparc/t-sol2-64 (SHLIB_SLIBDIR_SUFFIXES): Define. * lib/g77.exp (g77_link_flags): Append all multilib dirs containing libgcc_s*.so.1 below gcc object dir to LD_LIBRARY_PATH. * lib/g++.exp (g++_link_flags): Likewise. * lib/objc.exp (objc_target_compile): Likewise. * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Append all multilib dirs containing libgcc_s*.so.1 below gcc object dir to LD_LIBRARY_PATH. * testsuite/lib/libjava.exp (libjava_arguments): Append all multilib dirs containing libgcc_s*.so.1 below gcc object dir to LD_LIBRARY_PATH. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53345 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog6
-rw-r--r--libjava/testsuite/lib/libjava.exp34
2 files changed, 33 insertions, 7 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index f507bd1805e..3827474e8e0 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 4717c06b4cb..8f1f82948d4 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.