aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2017-09-21 22:47:12 +0200
committerAndy Polyakov <appro@openssl.org>2017-09-22 22:08:35 +0200
commit6d50589c0434a78733d40d3a0fd7cb97eef1cb94 (patch)
tree3b1bf6050906008944a4caf7cb238522629b0c10
parent8545051c3652bce7bb962afcb6879c4a6288bc67 (diff)
downloadopenssl-6d50589c0434a78733d40d3a0fd7cb97eef1cb94.tar.gz
Configure: add -Wmisleading-indentation to strict warnings flags.
The warning flag in question was added in GCC version 6, hence addition has to be conditional. Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/4401)
-rwxr-xr-xConfigure8
1 files changed, 6 insertions, 2 deletions
diff --git a/Configure b/Configure
index 326a3ff434..b1b847c59d 100755
--- a/Configure
+++ b/Configure
@@ -148,6 +148,7 @@ my $clang_devteam_warn = ""
. " -Wconditional-uninitialized"
. " -Wincompatible-pointer-types-discards-qualifiers"
. " -Wmissing-variable-declarations"
+ . " -Wno-unknown-warning-option"
;
# This adds backtrace information to the memory leak info. Is only used
@@ -1327,8 +1328,11 @@ if (defined($predefined{__clang__}) && !$disabled{asm}) {
if ($strict_warnings)
{
my $wopt;
- die "ERROR --strict-warnings requires gcc or gcc-alike"
- unless defined($predefined{__GNUC__});
+ my $gccver = $predefined{__GNUC__} // -1;
+
+ die "ERROR --strict-warnings requires gcc[>=4] or gcc-alike"
+ unless $gccver >= 4;
+ $gcc_devteam_warn .= " -Wmisleading-indentation" if $gccver >= 6;
foreach $wopt (split /\s+/, $gcc_devteam_warn)
{
$config{cflags} .= " $wopt" unless ($config{cflags} =~ /(?:^|\s)$wopt(?:\s|$)/)