Allow asan, msan and ubsan to be configured with shared libraries
[openssl.git] / util / shlib_wrap.sh.in
similarity index 96%
rename from util/shlib_wrap.sh
rename to util/shlib_wrap.sh.in
index ce463f1..eff1141 100755 (executable)
@@ -81,6 +81,7 @@ SunOS|IRIX*)
        ;;
 esac
 
+{- output_off() if $config{ex_libs} !~ /(^|\s)-Wl,-rpath,/; ""; -}
 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
@@ -96,6 +97,7 @@ if [ -f "$LIBCRYPTOSO" -a -z "$preload_var" ]; then
        DYLD_INSERT_LIBRARIES="$LIBCRYPTOSO:$LIBSSLSO"  # MacOS X
        export LD_PRELOAD _RLD_LIST DYLD_INSERT_LIBRARIES
 fi
+{- output_on() if $config{ex_libs} !~ /(^|\s)-Wl,-rpath,/; ""; -}
 
 cmd="$1"; [ -x "$cmd" ] || cmd="$cmd${EXE_EXT}"
 shift