From: Richard Levitte <levitte@openssl.org>
Date: Tue, 19 Jan 2016 19:35:41 +0000 (+0100)
Subject: Fix BSD -rpath parameter
X-Git-Tag: OpenSSL_1_1_0-pre3~486
X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c64879d3f3cc4c7f1c436a9fe3bd109847a23629;p=oweals%2Fopenssl.git

Fix BSD -rpath parameter

For BSD systems, Configure adds a shared_ldflags including a reference
to the Makefile variable LIBRPATH, but since it must be passed down to
Makefile.shared, care must be taken so the value of LIBRPATH doesn't
get expanded too early, or it ends up giving an empty string.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
---

diff --git a/Configure b/Configure
index 30e90b71e2..330748b4e4 100755
--- a/Configure
+++ b/Configure
@@ -1737,7 +1737,7 @@ if ($target =~ /\-icc$/)	# Intel C compiler
 # linker only when --prefix is not /usr.
 if ($target =~ /^BSD\-/)
 	{
-	$shared_ldflag.=" -Wl,-rpath,\$(LIBRPATH)" if ($prefix !~ m|^/usr[/]*$|);
+	$shared_ldflag.=" -Wl,-rpath,\$\$(LIBRPATH)" if ($prefix !~ m|^/usr[/]*$|);
 	}
 
 if ($sys_id ne "")