Commit 6703c4ea authored by Richard Levitte's avatar Richard Levitte
Browse files

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: default avatarMatt Caswell <matt@openssl.org>
parent 36e79832
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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|$)/)
			}
		}
	}