From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSUOt-0002iB-53 for qemu-devel@nongnu.org; Sun, 28 Oct 2012 11:03:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSUOs-0004yt-3G for qemu-devel@nongnu.org; Sun, 28 Oct 2012 11:03:43 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:54688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSUOr-0004ye-Rx for qemu-devel@nongnu.org; Sun, 28 Oct 2012 11:03:42 -0400 Received: by mail-lb0-f173.google.com with SMTP id gj3so2486249lbb.4 for ; Sun, 28 Oct 2012 08:03:40 -0700 (PDT) Message-ID: <508D4945.4050500@gmail.com> Date: Sun, 28 Oct 2012 19:03:33 +0400 From: Igor Mitsyanko MIME-Version: 1.0 References: <1351372747-15992-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1351372747-15992-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] configure: use -Wwombat to test whether gcc recognizes -Wno-wombat List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Blue Swirl , Stefan Weil , qemu-devel@nongnu.org, patches@linaro.org On 10/28/2012 1:19 AM, Peter Maydell wrote: > gcc will silently accept unrecognized -Wno-wombat warning suppression > options (it only mentions them if it has to print a compiler warning > for some other reason). Since we already run a check for whether gcc > recognizes the warning options we use, we can easily make this use > the positive sense of the option when checking for support for the > suppression option. This doesn't have any effect except that it avoids > gcc emitting extra messages about unrecognized command line options > when it is printing other warning messages. > > Signed-off-by: Peter Maydell > --- > configure | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/configure b/configure > index 37f712d..4c2ba06 100755 > --- a/configure > +++ b/configure > @@ -1169,7 +1169,11 @@ cat > $TMPC << EOF > int main(void) { return 0; } > EOF > for flag in $gcc_flags; do > - if compile_prog "-Werror $flag" "" ; then > + # Use the positive sense of the flag when testing for -Wno-wombat > + # support (gcc will happily accept the -Wno- form of unknown > + # warning options). > + optflag="$(echo $flag | sed -e 's/^-Wno-/-W/')" > + if compile_prog "-Werror $optflag" "" ; then > QEMU_CFLAGS="$QEMU_CFLAGS $flag" > fi > done > Reviewed-by: Igor Mitsyanko