qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mitsyanko <i.mitsyanko@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Blue Swirl <blauwirbel@gmail.com>, Stefan Weil <sw@weilnetz.de>,
	qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] configure: use -Wwombat to test whether gcc recognizes -Wno-wombat
Date: Sun, 28 Oct 2012 19:03:33 +0400	[thread overview]
Message-ID: <508D4945.4050500@gmail.com> (raw)
In-Reply-To: <1351372747-15992-1-git-send-email-peter.maydell@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 <peter.maydell@linaro.org>
> ---
>   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 <i.mitsyanko@samsung.com>

  parent reply	other threads:[~2012-10-28 15:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-27 21:19 [Qemu-devel] [PATCH] configure: use -Wwombat to test whether gcc recognizes -Wno-wombat Peter Maydell
2012-10-27 21:32 ` Stefan Weil
2012-10-28 15:03 ` Igor Mitsyanko [this message]
2012-10-30 21:09 ` Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=508D4945.4050500@gmail.com \
    --to=i.mitsyanko@gmail.com \
    --cc=blauwirbel@gmail.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).