]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Makefile: Avoid changing LIBDIR based on whether it already exists
authorjenda1 <lana.jan@gmail.com>
Tue, 20 Jul 2021 14:32:49 +0000 (16:32 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 23 Jul 2021 07:08:28 +0000 (09:08 +0200)
unix-Makefile.tmpl checks if the target LIBDIR exists on the build
machine or not and based on the result modify the final LIBDIR.
This should be avoided, build results should not depend on the build
machine root filesystem layout. It makes the build results unstable.

The fix simply removes the dir existence test from the unix-Makefile.tmpl.

Fixes: openssl#16121
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16122)

Configurations/unix-Makefile.tmpl

index 0fb80f1968657c21b610b7d14138516016db779c..f88a70f4828ec7673c3e0daf78e51c5ff1a3cc9a 100644 (file)
@@ -297,14 +297,7 @@ OPENSSLDIR={- #
               $openssldir -}
 LIBDIR={- our $libdir = $config{libdir};
           unless ($libdir) {
-              #
-              # if $prefix/lib$target{multilib} is not an existing
-              # directory, then assume that it's not searched by linker
-              # automatically, in which case adding $target{multilib} suffix
-              # causes more grief than we're ready to tolerate, so don't...
-              our $multilib =
-                  -d "$prefix/lib$target{multilib}" ? $target{multilib} : "";
-              $libdir = "lib$multilib";
+              $libdir = "lib$target{multilib}";
           }
           file_name_is_absolute($libdir) ? "" : $libdir -}
 # $(libdir) is chosen to be compatible with the GNU coding standards