]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Make the match for previous cflags a bit more strict
authorRichard Levitte <levitte@openssl.org>
Mon, 9 Nov 2015 08:50:56 +0000 (09:50 +0100)
committerRichard Levitte <levitte@openssl.org>
Mon, 9 Nov 2015 11:15:42 +0000 (12:15 +0100)
./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 <matt@openssl.org>
(cherry picked from commit 6703c4ea87b30554283deaa5df1f8d68725d3ee4)

Configure

index e374a69dcadd39a72acbfe5a392132eea5baf701..ac86cd6cf6a2594e028152a3de1c36f59e21a160 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1656,13 +1656,13 @@ if ($strict_warnings)
        die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc$/ 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|$)/)
                        }
                }
        }