File otp-R16B-rpath.patch of Package erlang
Index: otp-OTP-20.2.2/lib/crypto/c_src/Makefile.in
===================================================================
--- otp-OTP-20.2.2.orig/lib/crypto/c_src/Makefile.in
+++ otp-OTP-20.2.2/lib/crypto/c_src/Makefile.in
@@ -96,7 +96,7 @@ endif
DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
-SSL_DED_LD_RUNTIME_LIBRARY_PATH = @SSL_DED_LD_RUNTIME_LIBRARY_PATH@
+SSL_DED_LD_RUNTIME_LIBRARY_PATH =
CRYPTO_LINK_LIB=$(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -l$(SSL_CRYPTO_LIBNAME)
EXTRA_FLAGS = -DHAVE_DYNAMIC_CRYPTO_LIB
else
Index: otp-OTP-20.2.2/lib/crypto/priv/Makefile
===================================================================
--- otp-OTP-20.2.2.orig/lib/crypto/priv/Makefile
+++ otp-OTP-20.2.2/lib/crypto/priv/Makefile
@@ -61,7 +61,7 @@ OBJS = $(OBJDIR)/crypto.o
# ----------------------------------------------------
$(SO_NIFLIB): $(OBJS)
- $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) -Wl,-R$(SO_SSL_LIBDIR) \
+ $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) \
-o $@ $^ -lcrypto
$(DLL_NIFLIB): $(OBJS)