Fix -static builds on master
authorTom Cosgrove <tom.cosgrove@arm.com>
Mon, 17 May 2021 08:59:57 +0000 (09:59 +0100)
committerPauli <pauli@openssl.org>
Wed, 26 May 2021 07:34:01 +0000 (17:34 +1000)
Pull in Todd Short's fix cfd7225fbb from 1.1.1, which moves the disabling
of pic, threads and statics to before they are checked.

Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15214)

Configure

index a6fb8324a0cf53f8dae91fc09fda464d09575b88..92f7526bfaaee443b6a29d56fb19609134b43dfa 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1380,6 +1380,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 { $_ =~ /(?:^|\s)-static(?:\s|$)/ } @{$config{LDFLAGS}}) {
+    disable('static', 'pic', 'threads');
+}
+
 # Allow overriding the build file name
 $config{build_file} = env('BUILDFILE') || $target{build_file} || "Makefile";
 
@@ -1668,10 +1672,6 @@ if ($strict_warnings)
                 }
         }
 
-if (grep { $_ =~ /(?:^|\s)-static(?:\s|$)/ } @{$config{LDFLAGS}}) {
-    disable('static', 'pic', 'threads');
-}
-
 $config{CFLAGS} = [ map { $_ eq '--ossl-strict-warnings'
                               ? @strict_warnings_collection
                               : ( $_ ) }