From c8cc43108d97517dfce25a114acd5651f5548cd5 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 9 Nov 2015 09:50:56 +0100 Subject: [PATCH] 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 (cherry picked from commit 6703c4ea87b30554283deaa5df1f8d68725d3ee4) --- Configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Configure b/Configure index c9dedcd37d..fdf8d9a97e 100755 --- a/Configure +++ b/Configure @@ -1584,13 +1584,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|$)/) } } } -- 2.25.1