From 6b692ad7bd93797953906b93a72c8a6675e95112 Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Mon, 12 Jan 2004 22:19:26 +0100 Subject: [PATCH] libjava.exp: Add LD_LIBRARY_PATH_32/64 to get proper path setting for Ssolaris 32/64-bit testing. 2004-01-12 Andreas Tobler * lib/libjava.exp: Add LD_LIBRARY_PATH_32/64 to get proper path setting for Ssolaris 32/64-bit testing. Reorganize LD_LIBRARY_PATH setting. From-SVN: r75762 --- libjava/testsuite/ChangeLog | 6 +++++ libjava/testsuite/lib/libjava.exp | 39 +++++++++++++++++-------------- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog index d1394c54827..6d958a7a059 100644 --- a/libjava/testsuite/ChangeLog +++ b/libjava/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2004-01-12 Andreas Tobler + + * lib/libjava.exp: Add LD_LIBRARY_PATH_32/64 to get proper + path setting for Ssolaris 32/64-bit testing. + Reorganize LD_LIBRARY_PATH setting. + 2004-01-09 Andrew Haley * lib/libjava.exp (bytecompile_file): Log compile command. diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp index 3f55f766568..31937c3a1e0 100644 --- a/libjava/testsuite/lib/libjava.exp +++ b/libjava/testsuite/lib/libjava.exp @@ -175,16 +175,20 @@ proc libjava_init { args } { if [info exists env(LD_LIBRARY_PATH)] { set original_ld_library_path $env(LD_LIBRARY_PATH) + # For HP-UX. + } elseif [info exists env(SHLIB_PATH)] { + set original_ld_library_path $env(SHLIB_PATH) + # For Darwin. + } elseif [info exists env(DYLD_LIBRARY_PATH)] { + set original_ld_library_path $env(DYLD_LIBRARY_PATH) + # For Solaris 32 bit. + } elseif [info exists env(LD_LIBRARY_PATH_32)] { + set original_ld_library_path $env(LD_LIBRARY_PATH_32) + # For Solaris 64 bit. + } elseif [info exists env(LD_LIBRARY_PATH_64)] { + set original_ld_library_path $env(LD_LIBRARY_PATH_64) } else { - if [info exists env(SHLIB_PATH)] { - set original_ld_library_path $env(SHLIB_PATH) - } else { - if [info exists env(DYLD_LIBRARY_PATH)] { - set original_ld_library_path $env(DYLD_LIBRARY_PATH) - } else { - set original_ld_library_path "" - } - } + set original_ld_library_path "" } set wrapper_file ""; @@ -363,8 +367,6 @@ proc libjava_arguments {{mode compile}} { # Set variables the dynamic linker looks at. global original_ld_library_path setenv LD_LIBRARY_PATH "$ld_library_path:$original_ld_library_path" - setenv SHLIB_PATH "$ld_library_path:$original_ld_library_path" - setenv DYLD_LIBRARY_PATH "$ld_library_path:$original_ld_library_path" verbose "LD_LIBRARY_PATH = $env(LD_LIBRARY_PATH)" @@ -460,8 +462,6 @@ proc gcj_invoke {program expectFile ld_library_additions} { append newval :$lib_path setenv LD_LIBRARY_PATH $newval - setenv SHLIB_PATH $newval - setenv DYLD_LIBRARY_PATH $newval verbose "LD_LIBRARY_PATH=$env(LD_LIBRARY_PATH)" @@ -471,8 +471,6 @@ proc gcj_invoke {program expectFile ld_library_additions} { # Restore setting setenv LD_LIBRARY_PATH $lib_path - setenv SHLIB_PATH $lib_path - setenv DYLD_LIBRAY_PATH $lib_path if {$status != "pass"} { verbose "got $output" @@ -909,12 +907,17 @@ proc default_libjava_start { } { # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH # (for the 64-bit ABI). The right way to do this would be to modify # unix.exp -- but that's not an option since it's part of DejaGNU -# proper, so we do it here, by trickery. We really only need to do -# this on IRIX, but it shouldn't hurt to do it anywhere else. - +# proper, so we do it here, by trickery. +# The same applies to darwin (DYLD_LIBRARY_PATH), solaris 32 bit +# (LD_LIBRARY_PATH_32), solaris 64 bit (LD_LIBRARY_PATH_64), and HP-UX +# (SHLIB_PATH). proc ${tool}_set_ld_library_path { name element op } { setenv LD_LIBRARYN32_PATH [getenv LD_LIBRARY_PATH] setenv LD_LIBRARY64_PATH [getenv LD_LIBRARY_PATH] + setenv SHLIB_PATH [getenv LD_LIBRARY_PATH] + setenv DYLD_LIBRARY_PATH [getenv LD_LIBRARY_PATH] + setenv LD_LIBRARY_PATH_32 [getenv LD_LIBRARY_PATH] + setenv LD_LIBRARY_PATH_64 [getenv LD_LIBRARY_PATH] } trace variable env(LD_LIBRARY_PATH) w ${tool}_set_ld_library_path