From 6703c4ea87b30554283deaa5df1f8d68725d3ee4 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 9 Nov 2015 09:50:56 +0100 Subject: [PATCH 1/1] 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 --- Configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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|$)/) } } } -- 2.34.1