qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 2/4] configure: factor out supported flag check
Date: Mon, 23 Mar 2015 10:44:58 -0400	[thread overview]
Message-ID: <551026EA.5040401@redhat.com> (raw)
In-Reply-To: <20150323130330.GF9268@stefanha-thinkpad.redhat.com>



On 03/23/2015 09:03 AM, Stefan Hajnoczi wrote:
> On Thu, Mar 19, 2015 at 03:01:35PM -0400, John Snow wrote:
>> +cc_has_warning_flag() {
>> +    if [ "$2" != "--keep-tmpc" ]; then
>> +        write_c_skeleton;
>> +    fi
>> +
>>       # 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"
>> +    optflag="$(echo $1 | sed -e 's/^-Wno-/-W/')"
>> +    compile_prog "-Werror $optflag" ""
>> +}
>> +
>> +write_c_skeleton;
>> +for flag in $gcc_flags; do
>> +    if cc_has_warning_flag $flag --keep-tmpc; then
>
> The only caller that uses --keep-tmpc wants TMPC to be the skeleton
> program anyway.  The option can be dropped and the write_c_skeleton in
> cc_has_warning_flag can be unconditional.
>
> Stefan
>

I just figured there was no use in rewriting the same skeleton file 
unconditionally in a loop.

The helper is used later where we do want to regenerate the skeleton.

If you still want me to just make it unconditional, I can, but I don't 
see the point.

--js

  reply	other threads:[~2015-03-23 14:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-19 19:01 [Qemu-devel] [PATCH v3 0/4] configure: clang 3.5.0 build fixes John Snow
2015-03-19 19:01 ` [Qemu-devel] [PATCH v3 1/4] configure: handle clang -nopie argument warning John Snow
2015-03-19 19:01 ` [Qemu-devel] [PATCH v3 2/4] configure: factor out supported flag check John Snow
2015-03-23 13:03   ` Stefan Hajnoczi
2015-03-23 14:44     ` John Snow [this message]
2015-03-23 14:48       ` Paolo Bonzini
2015-03-23 14:50       ` Stefan Hajnoczi
2015-03-19 19:01 ` [Qemu-devel] [PATCH v3 3/4] configure: silence glib unknown attribute __alloc_size__ John Snow
2015-03-19 19:01 ` [Qemu-devel] [PATCH v3 4/4] configure: Add workaround for ccache and clang John Snow
2015-03-23 12:58   ` Stefan Hajnoczi
2015-03-23 13:11   ` Peter Maydell
2015-03-23 14:52     ` John Snow
2015-03-23 15:14       ` Peter Maydell
2015-03-23 16:32         ` John Snow

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=551026EA.5040401@redhat.com \
    --to=jsnow@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /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).