Fix BSD -rpath parameter
authorRichard Levitte <levitte@openssl.org>
Tue, 19 Jan 2016 19:35:41 +0000 (20:35 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 19 Jan 2016 19:58:27 +0000 (20:58 +0100)
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>
Configure

index 30e90b71e2e2423089f6d20cab346ba588eebf77..330748b4e4f4c84c594c45c9014314ecde506c19 100755 (executable)
--- 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 "")