From: Richard Levitte Date: Mon, 9 Nov 2015 08:50:56 +0000 (+0100) Subject: Make the match for previous cflags a bit more strict X-Git-Tag: OpenSSL_1_1_0-pre1~297 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=6703c4ea87b30554283deaa5df1f8d68725d3ee4;hp=36e79832d33a5e5ec11a21071c4889ff25d47075 Make the match for previous cflags a bit more strict ./Configure [target] --strict-warnings -Wno-pedantic-ms-format would not add '-pedantic' because it matches '-Wno-pedantic-ms-format', which was added first. Reviewed-by: Matt Caswell --- diff --git a/Configure b/Configure index 79562477f9..c53c316e2d 100755 --- a/Configure +++ b/Configure @@ -1740,13 +1740,13 @@ if ($strict_warnings) die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc(-\d(\.\d)*)?$/ or $ecc =~ /clang$/); foreach $wopt (split /\s+/, $gcc_devteam_warn) { - $cflags .= " $wopt" unless ($cflags =~ /$wopt/) + $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/) } if ($ecc eq "clang") { foreach $wopt (split /\s+/, $clang_devteam_warn) { - $cflags .= " $wopt" unless ($cflags =~ /$wopt/) + $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/) } } }