summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-03-09 11:36:32 +0100
committerRichard Levitte <levitte@openssl.org>2016-03-09 12:21:01 +0100
commite76f48539109829819aabc03953cf2cfd4612961 (patch)
tree4ce5affbe3fb94f8fff47da880f4d0fcc13f9344
parentd3b3715072f1d589ee88a68cc5c07e93a31c0f09 (diff)
downloadopenssl-new-e76f48539109829819aabc03953cf2cfd4612961.tar.gz
Touch the correct variables for the system; shlib_wrap.sh on Solaris
If there is cause to think LD_LIBRARY_PATH_32 and LD_PRELOAD_32 are appropriate variables to touch, do so. Otherwise, touch the usual LD_LIBRARY_PATH and LD_PRELOAD. This covers for older installations that don't have a mix of 32-bit and 64-bit libs. Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit a772e9d01a81dae132cb03107292b3ecc725e5af)
-rwxr-xr-xutil/shlib_wrap.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/util/shlib_wrap.sh b/util/shlib_wrap.sh
index fb2915d21d..de111e9a3f 100755
--- a/util/shlib_wrap.sh
+++ b/util/shlib_wrap.sh
@@ -28,9 +28,13 @@ SunOS|IRIX*)
preload_var=LD_PRELOAD_64
;;
*ELF\ 32*SPARC*|*ELF\ 32*80386*)
- [ -n "$LD_LIBRARY_PATH_32" ] && rld_var=LD_LIBRARY_PATH_32
- LD_PRELOAD_32="$LIBCRYPTOSO $LIBSSLSO"; export LD_PRELOAD_32
- preload_var=LD_PRELOAD_32
+ # We only need to change LD_PRELOAD_32 and LD_LIBRARY_PATH_32
+ # on a multi-arch system. Otherwise, trust the fallbacks.
+ if [ -f /lib/64/ld.so.1 ]; then
+ [ -n "$LD_LIBRARY_PATH_32" ] && rld_var=LD_LIBRARY_PATH_32
+ LD_PRELOAD_32="$LIBCRYPTOSO $LIBSSLSO"; export LD_PRELOAD_32
+ preload_var=LD_PRELOAD_32
+ fi
;;
# Why are newly built .so's preloaded anyway? Because run-time
# .so lookup path embedded into application takes precedence