From: Richard Levitte Date: Tue, 23 Apr 2019 07:29:45 +0000 (+0200) Subject: Configure: recognise -static even if given through variables X-Git-Tag: openssl-3.0.0-alpha1~2139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4650d10ff6ad1048785a009349c8b5d6e922fc7a;p=thirdparty%2Fopenssl.git Configure: recognise -static even if given through variables Fixes #8787 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/8812) --- diff --git a/Configure b/Configure index b330fd68875..ea784618ccf 100755 --- a/Configure +++ b/Configure @@ -892,9 +892,6 @@ while (@argvcopy) elsif (/^-static$/) { push @{$useradd{LDFLAGS}}, $_; - $disabled{"pic"} = "forced"; - $disabled{"shared"} = "forced"; - $disabled{"threads"} = "forced"; } elsif (/^-D(.*)$/) { @@ -1583,6 +1580,13 @@ if ($strict_warnings) @{$clang_devteam_warn{CXXFLAGS}} if (defined($predefined_CXX{__clang__})); } + +if (grep { $_ eq '-static' } @{$config{LDFLAGS}}) { + $disabled{"pic"} = "forced"; + $disabled{"shared"} = "forced"; + $disabled{"threads"} = "forced"; +} + foreach my $idx (qw(CFLAGS CXXFLAGS)) { $config{$idx} = [ map { $_ eq '--ossl-strict-warnings'