aboutsummaryrefslogtreecommitdiffstats
path: root/util/shlib_wrap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'util/shlib_wrap.sh')
-rwxr-xr-xutil/shlib_wrap.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/shlib_wrap.sh b/util/shlib_wrap.sh
index 8775cb5411e1..de111e9a3f55 100755
--- a/util/shlib_wrap.sh
+++ b/util/shlib_wrap.sh
@@ -27,6 +27,15 @@ SunOS|IRIX*)
LD_PRELOAD_64="$LIBCRYPTOSO $LIBSSLSO"; export LD_PRELOAD_64
preload_var=LD_PRELOAD_64
;;
+ *ELF\ 32*SPARC*|*ELF\ 32*80386*)
+ # 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
# over LD_LIBRARY_PATH and as result application ends up linking