diff options
author | Andy Polyakov <appro@openssl.org> | 2007-09-16 12:24:17 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2007-09-16 12:24:17 +0000 |
commit | 18fd413f37df0c3b6e85b4e6689a27f16a854f04 (patch) | |
tree | 7aa1333fe0805df76a4d96361413062ede17d964 | |
parent | 80ed5f84de50b4958258fb1a9b9afddc1d33cf96 (diff) | |
download | openssl-new-18fd413f37df0c3b6e85b4e6689a27f16a854f04.tar.gz |
BSD run-time linkers apparently demand RPATH on .so objects [from HEAD].
PR: 1381
-rwxr-xr-x | Configure | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -1163,8 +1163,10 @@ if (!$IsMK1MF) $cpuid_obj.=" uplink.o uplink-cof.o" if ($cflags =~ /\-DOPENSSL_USE_APPLINK/); -# Compiler fix-ups -if ($target =~ /icc$/) +# +# Platform fix-ups +# +if ($target =~ /\-icc$/) # Intel C compiler { my $iccver=0; if (open(FD,"$cc -V 2>&1 |")) @@ -1190,6 +1192,19 @@ if ($target =~ /icc$/) } } +# 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. +if ($target =~ /^BSD\-/) + { + $shared_ldflag.=" -Wl,-rpath,\$(LIBRPATH)" if ($prefix !~ m|^/usr[/]*$|); + } + if ($sys_id ne "") { #$cflags="-DOPENSSL_SYSNAME_$sys_id $cflags"; |