From 007213795a0e15901cbdc4558ae2a8c21d3ad9bb Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 23 Apr 2019 09:29:45 +0200 Subject: Configure: recognise -static even if given through variables Fixes #8787 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/8812) (cherry picked from commit 4650d10ff6ad1048785a009349c8b5d6e922fc7a) --- Configure | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Configure') diff --git a/Configure b/Configure index cba080a99b..84e3459fdf 100755 --- a/Configure +++ b/Configure @@ -860,9 +860,6 @@ while (@argvcopy) elsif (/^-static$/) { push @{$useradd{LDFLAGS}}, $_; - $disabled{"pic"} = "forced"; - $disabled{"shared"} = "forced"; - $disabled{"threads"} = "forced"; } elsif (/^-D(.*)$/) { @@ -1560,6 +1557,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' -- cgit v1.2.3