]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix -static builds
authorTodd Short <tshort@akamai.com>
Wed, 2 Sep 2020 20:57:46 +0000 (16:57 -0400)
committerRichard Levitte <levitte@openssl.org>
Thu, 14 Jan 2021 09:35:16 +0000 (10:35 +0100)
Pull in check from #10878
Move disabling of pic, threads and statics up higher before they
are checked.

Fixes #12772

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12773)

Configure

index 1d73d06e1b3b3e704037d8eef0eea4e1724a84ba..f25b84bff290715f5cdcae53e4b50166e1ea37ed 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1201,6 +1201,10 @@ foreach (keys %useradd) {
 # At this point, we can forget everything about %user and %useradd,
 # because it's now all been merged into the corresponding $config entry
 
+if (grep { $_ eq '-static' } @{$config{LDFLAGS}}) {
+    disable('static', 'pic', 'threads');
+}
+
 # Allow overriding the build file name
 $config{build_file} = env('BUILDFILE') || $target{build_file} || "Makefile";
 
@@ -1521,10 +1525,6 @@ if ($strict_warnings)
                 }
         }
 
-if (grep { $_ eq '-static' } @{$config{LDFLAGS}}) {
-    disable('static', 'pic', 'threads');
-}
-
 $config{CFLAGS} = [ map { $_ eq '--ossl-strict-warnings'
                               ? @strict_warnings_collection
                               : ( $_ ) }