From bfdfc67b01632e20829ebea74186a13e0eca0371 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Mon, 16 Jul 2007 14:02:52 +0000 Subject: [PATCH] shlib_wrap.sh update [from HEAD]. --- util/shlib_wrap.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/util/shlib_wrap.sh b/util/shlib_wrap.sh index dc5f5b1ce4..3866e1851a 100755 --- a/util/shlib_wrap.sh +++ b/util/shlib_wrap.sh @@ -22,16 +22,20 @@ SunOS|IRIX*) # variables depending on target ABI... rld_var=LD_LIBRARY_PATH case "`(/usr/bin/file "$LIBCRYPTOSO") 2>/dev/null`" in - *ELF\ 64*SPARC*) + *ELF\ 64*SPARC*|*ELF\ 64*AMD64*) [ -n "$LD_LIBRARY_PATH_64" ] && rld_var=LD_LIBRARY_PATH_64 + LD_PRELOAD_64="$LIBCRYPTOSO $LIBSSLSO"; export LD_PRELOAD_64 + preload_var=LD_PRELOAD_64 ;; *ELF\ N32*MIPS*) [ -n "$LD_LIBRARYN32_PATH" ] && rld_var=LD_LIBRARYN32_PATH _RLDN32_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLDN32_LIST + preload_var=_RLDN32_LIST ;; *ELF\ 64*MIPS*) [ -n "$LD_LIBRARY64_PATH" ] && rld_var=LD_LIBRARY64_PATH _RLD64_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLD64_LIST + preload_var=_RLD64_LIST ;; esac eval $rld_var=\"${THERE}:'$'$rld_var\"; export $rld_var @@ -52,7 +56,7 @@ SunOS|IRIX*) ;; esac -if [ -f "$LIBCRYPTOSO" ]; then +if [ -f "$LIBCRYPTOSO" -a -z "$preload_var" ]; then # Following three lines are major excuse for isolating them into # this wrapper script. Original reason for setting LD_PRELOAD # was to make it possible to pass 'make test' when user linked @@ -64,7 +68,8 @@ if [ -f "$LIBCRYPTOSO" ]; then *) LD_PRELOAD="$LIBCRYPTOSO $LIBSSLSO" ;; # SunOS, Linux, ELF HP-UX esac _RLD_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT" # Tru64, o32 IRIX - export LD_PRELOAD _RLD_LIST + DYLD_INSERT_LIBRARIES="$LIBCRYPTOSO:$LIBSSLSO" # MacOS X + export LD_PRELOAD _RLD_LIST DYLD_INSERT_LIBRARIES fi exec "$@" -- 2.25.1