From: Peter Maydell <peter.maydell@linaro.org>
To: Thomas Huth <thuth@redhat.com>
Cc: Andrew Randrianasulu <randrianasulu@gmail.com>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Build error with git commit 8eb29f1bf5a974dc4c11d2d1f5e7c7f7a62be116 on x86_64
Date: Tue, 26 Feb 2019 11:05:48 +0000 [thread overview]
Message-ID: <CAFEAcA8idrLohrWrieChU1Mm55NVaiEAXYQZEcNP5Dy2QjqeKg@mail.gmail.com> (raw)
In-Reply-To: <e9d2cf10-0c52-a1b6-2be9-e396bd76cf2f@redhat.com>
On Tue, 26 Feb 2019 at 09:06, Thomas Huth <thuth@redhat.com> wrote:
> Ok, then that's the problem here: GCC often produces some additional
> "may be unused" warnings with -O3, and we normally only guarantee that
> QEMU compiles without warnings when using the standard -O2 optimization
> level.
> So if you want to compile with -O3, you also have to specify
> --disable-werror (or add -Wno-error=maybe-unitialized to the CFLAGS).
> But unless you have really an urgent need for O3, I'd rather recommend
> to compile with the well-tested O2 optimization level instead.
I think in general we should probably look at fixing warnings
that occur at -O3 when they're reported to us, even if we don't
habitually build that way. But, like using bleeding-edge versions of
gcc or clang, if you use an odd set of optimization flags you might
find you run into warnings we haven't seen yet and need to make them
non-fatal with --disable-werror. (--disable-werror is the default for
releases, so you'll only get compile failures if building from git.)
Actual "QEMU is broken when built with -O3" issues are definitely
worth investigating since they imply either a QEMU bug or a
compiler bug.
PS: in general -O3 is not necessarily going to generate better code
than -O2 if used as a blanket optimization setting -- it can
end up generating larger code that increases icache pressure.
Probably best used carefully and when benchmarking shows that
it's actually an improvement.
thanks
-- PMM
next prev parent reply other threads:[~2019-02-26 11:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-23 0:35 [Qemu-devel] Build error with git commit 8eb29f1bf5a974dc4c11d2d1f5e7c7f7a62be116 on x86_64 Andrew Randrianasulu
2019-02-25 14:13 ` Eric Blake
2019-02-25 16:19 ` Philippe Mathieu-Daudé
2019-02-25 17:29 ` Andrew Randrianasulu
2019-02-26 8:54 ` Thomas Huth
2019-02-26 8:58 ` Andrew Randrianasulu
2019-02-26 9:05 ` Thomas Huth
2019-02-26 9:46 ` Andrew Randrianasulu
2019-02-26 9:58 ` Thomas Huth
2019-02-26 10:44 ` Andrew Randrianasulu
2019-02-26 11:05 ` Peter Maydell [this message]
2019-02-26 12:16 ` Thomas Huth
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=CAFEAcA8idrLohrWrieChU1Mm55NVaiEAXYQZEcNP5Dy2QjqeKg@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=randrianasulu@gmail.com \
--cc=thuth@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).