summaryrefslogtreecommitdiffstats
path: root/Configurations
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-10-12 17:18:11 +0200
committerRichard Levitte <richard@levitte.org>2016-10-13 02:24:40 +0200
commit68f3b899105b5709b8d73265549c93a78e0f6e72 (patch)
tree01b2736de0fcba9bb76220b5174046aed474de42 /Configurations
parente4e407fe829fb474432b62b46e18f8de8e3a1729 (diff)
Remove automatic RPATH
Before OpenSSL 1.1.0, binaries were installed in a non-standard location by default, and runpath directories were therefore added in those binaries, to make sure the executables would be able to find the shared libraries they were linked with. With OpenSSL 1.1.0 and on, binaries are installed in standard directories by default, and the addition of runpath directories is therefore not needed any more. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 075f7e2c6062a33352f570eeafe3c95e41419521)
Diffstat (limited to 'Configurations')
-rw-r--r--Configurations/unix-Makefile.tmpl15
1 files changed, 1 insertions, 14 deletions
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 021f8c1f64..85f399616b 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -173,20 +173,7 @@ LDFLAGS= {- $target{lflags} -}
PLIB_LDFLAGS= {- $target{plib_lflags} -}
EX_LIBS= {- $target{ex_libs} -} {- $config{ex_libs} -}
LIB_CFLAGS={- $target{shared_cflag} || "" -}
-LIB_LDFLAGS={- $target{shared_ldflag}." ".$config{shared_ldflag}
- # Unlike other OSes (like Solaris, Linux, Tru64,
- # IRIX) BSD run-time linkers (tested OpenBSD, NetBSD
- # and FreeBSD) "demand" RPATH set on .so objects.
- # Apparently application RPATH is not global and
- # does not apply to .so linked with other .so.
- # Problem manifests itself when libssl.so fails to
- # load libcrypto.so. One can argue that we should
- # engrave this into Makefile.shared rules or into
- # BSD-* config lines above. Meanwhile let's try to
- # be cautious and pass -rpath to linker only when
- # $prefix is not /usr.
- . ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$|
- ? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -}
+LIB_LDFLAGS={- $target{shared_ldflag}." ".$config{shared_ldflag} -}
DSO_CFLAGS={- $target{shared_cflag} || "" -}
DSO_LDFLAGS=$(LIB_LDFLAGS)
BIN_CFLAGS={- $target{bin_cflags} -}