From: Wei Liu <wei.liu2@citrix.com>
To: Doug Goldstein <cardoe@cardoe.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH v3] tools: detect appropriate debug optimization level
Date: Thu, 28 Apr 2016 11:57:20 +0100 [thread overview]
Message-ID: <20160428105720.GE20763@citrix.com> (raw)
In-Reply-To: <1461681525-12078-1-git-send-email-cardoe@cardoe.com>
On Tue, Apr 26, 2016 at 09:38:45AM -0500, Doug Goldstein wrote:
> When building debug use -Og as the optimization level if its available,
> otherwise retain the use of -O0. -Og has been added by GCC to enable all
> optimizations that to not affect debugging while retaining full
> debugability.
>
> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
I think Ian's comment has been addressed in this version:
Acked-by: Wei Liu <wei.liu2@citrix.com>
I plan to accept this patch for 4.7, the risk is rather low anyway.
I will wait a bit before committing in case Ian has more to say.
> ---
> change since v2:
> - switch back to cc-option-add to not call cc-option on every invocation
> change since v1:
> - switch to cc-option to only specify -O0 if -Og isn't supported
> ---
> tools/Rules.mk | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/Rules.mk b/tools/Rules.mk
> index 9ef0b47..1b79a6e 100644
> --- a/tools/Rules.mk
> +++ b/tools/Rules.mk
> @@ -138,6 +138,7 @@ SHLIB_libxenvchan = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN)
> ifeq ($(debug),y)
> # Disable optimizations and enable debugging information for macros
> CFLAGS += -O0 -g3
> +$(call cc-option-add,CFLAGS,CC,-Og)
> # But allow an override to -O0 in case Python enforces -D_FORTIFY_SOURCE=<n>.
> PY_CFLAGS += $(PY_NOOPT_CFLAGS)
> endif
> --
> 2.7.3
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-28 10:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 14:38 [PATCH v3] tools: detect appropriate debug optimization level Doug Goldstein
2016-04-28 10:57 ` Wei Liu [this message]
2016-04-28 17:19 ` Ian Jackson
2016-04-28 17:22 ` Wei Liu
2016-04-28 17:40 ` Wei Liu
2018-02-24 5:26 ` Doug Goldstein
2018-03-02 12:46 ` Wei Liu
2018-03-11 5:08 ` Doug Goldstein
2018-03-12 16:16 ` Wei Liu
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=20160428105720.GE20763@citrix.com \
--to=wei.liu2@citrix.com \
--cc=cardoe@cardoe.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.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.