All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Doug Goldstein <cardoe@cardoe.com>
Cc: euan.harris@citrix.com, Wei Liu <wei.liu2@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH 2/2] tools: detect appropriate debug optimization level
Date: Tue, 8 Mar 2016 15:38:47 +0000	[thread overview]
Message-ID: <20160308153847.GF31271@citrix.com> (raw)
In-Reply-To: <1457403820-2949-2-git-send-email-cardoe@cardoe.com>

On Mon, Mar 07, 2016 at 08:23:40PM -0600, Doug Goldstein wrote:
> The build should not use -O0 as that results in miscompilations. There

This needs some (concrete) references. Is that a known issue in gcc? If
so can you reference the bug number?

> have been a few instances on the ML where users were told to switch
> from -O0 to -O1 or -O2 or to set debug=n and their issue went away. The
> preferred route should be to use -Og if its available, otherwise use
> -O1 which is the default. This change undoes the change from -O1 to -O0

gcc manual says -O0 is the default.

Not that I disagree with this patch in general, but the commit message
seems a bit misleading.

> in 1166ecf781b1016eaa61f8d5ba4fb1fde9d599b6.
> 

And I have no idea why -O1 confuses the debugger so I've CC'ed Euan for
more input.

> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
> ---
> CC: Ian Jackson <ian.jackson@eu.citrix.com>
> CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> CC: Wei Liu <wei.liu2@citrix.com>
> ---
>  tools/Rules.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/Rules.mk b/tools/Rules.mk
> index 9ef0b47..ae6b01f 100644
> --- a/tools/Rules.mk
> +++ b/tools/Rules.mk
> @@ -137,7 +137,8 @@ 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)
> +CFLAGS += -g3
>  # But allow an override to -O0 in case Python enforces -D_FORTIFY_SOURCE=<n>.
>  PY_CFLAGS += $(PY_NOOPT_CFLAGS)
>  endif
> -- 
> 2.4.10
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-03-08 15:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-08  2:23 [PATCH 1/2] libxl: ensure var is inited in libxl__domain_firmware Doug Goldstein
2016-03-08  2:23 ` [PATCH 2/2] tools: detect appropriate debug optimization level Doug Goldstein
2016-03-08 15:38   ` Wei Liu [this message]
2016-03-08 16:34     ` Doug Goldstein
2016-03-08 16:50       ` Wei Liu
2016-03-16 19:14         ` Doug Goldstein
2016-03-28 15:01           ` Doug Goldstein
2016-03-29 11:44             ` George Dunlap
2016-03-29 17:21               ` Doug Goldstein
2016-03-30  9:52                 ` George Dunlap
2016-03-30 16:00       ` Ian Jackson
2016-03-30 16:11         ` Ian Jackson
2016-03-30 16:20         ` Doug Goldstein
2016-03-31  8:24         ` George Dunlap
2016-04-06 14:07   ` Ian Jackson
2016-04-06 14:34     ` George Dunlap
2016-04-06 14:57       ` Ian Jackson
2016-03-08 15:38 ` [PATCH 1/2] libxl: ensure var is inited in libxl__domain_firmware Wei Liu
2016-03-10 15:13   ` Doug Goldstein

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=20160308153847.GF31271@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=euan.harris@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@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.