From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] Should configure --enable-debug add -Og to CFLAGS?
Date: Thu, 27 Jun 2019 17:02:18 +0100 [thread overview]
Message-ID: <20190627160218.GO12358@redhat.com> (raw)
In-Reply-To: <87tvcbc9ul.fsf@dusky.pond.sub.org>
On Thu, Jun 27, 2019 at 05:43:30PM +0200, Markus Armbruster wrote:
> The fine manual advises:
>
> '-O0'
> Reduce compilation time and make debugging produce the expected
> results. This is the default.
> [...]
> '-Og'
> Optimize debugging experience. '-Og' should be the optimization
> level of choice for the standard edit-compile-debug cycle, offering
> a reasonable level of optimization while maintaining fast
> compilation and a good debugging experience. It is a better choice
> than '-O0' for producing debuggable code because some compiler
> passes that collect debug information are disabled at '-O0'.
>
> Our configure --enable-debug effectively picks -O0. Should it pick -Og
> instead?
NB, it is the --enable-debug-info option to configure that actually
adds the "-g" flag for debug info in objects, and turns off -O2.
--enable-debug turns on TCG and Mutex debugging & disables fortify
source, but doesn't affect optimization level.
Adding -Og to --enable-debug-info would be problematic for Fedora/RHEL
distro builds, as we want debugging symbols, but also still want -O2
to be used.
Yes, the naming of these options is a trapdoor over a pit of crocodiles :-)
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
prev parent reply other threads:[~2019-06-27 16:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-27 15:43 [Qemu-devel] Should configure --enable-debug add -Og to CFLAGS? Markus Armbruster
2019-06-27 16:01 ` Paolo Bonzini
2019-06-27 16:45 ` Markus Armbruster
2019-06-27 16:02 ` Daniel P. Berrangé [this message]
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=20190627160218.GO12358@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.