All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] build: minor adjustment
@ 2016-12-21 16:43 Wei Liu
  2016-12-21 16:44 ` [PATCH 1/2] build: move debug_symbols to tools/Rules.mk Wei Liu
  2016-12-21 16:44 ` [PATCH 2/2] build: use debug_symbols to add -g3 Wei Liu
  0 siblings, 2 replies; 5+ messages in thread
From: Wei Liu @ 2016-12-21 16:43 UTC (permalink / raw)
  To: Xen-devel; +Cc: Wei Liu

Wei Liu (2):
  build: move debug_symbols to tools/Rules.mk
  build: use debug_symbols to add -g3

 Config.mk      | 5 -----
 tools/Rules.mk | 7 ++++++-
 2 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.1.4


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] build: move debug_symbols to tools/Rules.mk
  2016-12-21 16:43 [PATCH 0/2] build: minor adjustment Wei Liu
@ 2016-12-21 16:44 ` Wei Liu
  2016-12-22  8:51   ` Jan Beulich
  2016-12-21 16:44 ` [PATCH 2/2] build: use debug_symbols to add -g3 Wei Liu
  1 sibling, 1 reply; 5+ messages in thread
From: Wei Liu @ 2016-12-21 16:44 UTC (permalink / raw)
  To: Xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich

31d41d7b tried to make debug affect tools build only but failed to move
debug_symbols (which appends "-g" to CFLAGS) to tools/Rules.mk. Do that
in this patch.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 Config.mk      | 5 -----
 tools/Rules.mk | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Config.mk b/Config.mk
index b26e15c..addf95a 100644
--- a/Config.mk
+++ b/Config.mk
@@ -19,7 +19,6 @@ or       = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$(
 # A debug build of tools?
 # Hypervisor debug build is controlled by Kconfig.
 debug ?= y
-debug_symbols ?= $(debug)
 
 XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
                          -e s/i86pc/x86_32/ -e s/amd64/x86_64/ \
@@ -211,10 +210,6 @@ define buildmakevars2header-closure
 	$(call move-if-changed,$(1).tmp,$(1))
 endef
 
-ifeq ($(debug_symbols),y)
-CFLAGS += -g
-endif
-
 CFLAGS += -fno-strict-aliasing
 
 CFLAGS += -std=gnu99
diff --git a/tools/Rules.mk b/tools/Rules.mk
index 0e73690..0047063 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -26,6 +26,11 @@ CFLAGS_xeninclude = -I$(XEN_INCLUDE)
 
 XENSTORE_XENSTORED ?= y
 
+debug_symbols ?= $(debug)
+ifeq ($(debug_symbols),y)
+CFLAGS += -g
+endif
+
 ifneq ($(nosharedlibs),y)
 INSTALL_SHLIB = $(INSTALL_PROG)
 SYMLINK_SHLIB = ln -sf
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] build: use debug_symbols to add -g3
  2016-12-21 16:43 [PATCH 0/2] build: minor adjustment Wei Liu
  2016-12-21 16:44 ` [PATCH 1/2] build: move debug_symbols to tools/Rules.mk Wei Liu
@ 2016-12-21 16:44 ` Wei Liu
  1 sibling, 0 replies; 5+ messages in thread
From: Wei Liu @ 2016-12-21 16:44 UTC (permalink / raw)
  To: Xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich

While doing archeology I found 38ce7ce3,  we should also make sure
debug_symbols is the responsible for adding "-g" to CFLAGS.

Move adding "-g3" from being guarded by debug to being guarded by
debug_symbols.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 tools/Rules.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index 0047063..67e95f8 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -28,7 +28,7 @@ XENSTORE_XENSTORED ?= y
 
 debug_symbols ?= $(debug)
 ifeq ($(debug_symbols),y)
-CFLAGS += -g
+CFLAGS += -g3
 endif
 
 ifneq ($(nosharedlibs),y)
@@ -143,7 +143,7 @@ SHLIB_libxenvchan  = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN)
 
 ifeq ($(debug),y)
 # Disable optimizations and enable debugging information for macros
-CFLAGS += -O0 -g3 -fno-omit-frame-pointer
+CFLAGS += -O0 -fno-omit-frame-pointer
 # But allow an override to -O0 in case Python enforces -D_FORTIFY_SOURCE=<n>.
 PY_CFLAGS += $(PY_NOOPT_CFLAGS)
 else
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] build: move debug_symbols to tools/Rules.mk
  2016-12-21 16:44 ` [PATCH 1/2] build: move debug_symbols to tools/Rules.mk Wei Liu
@ 2016-12-22  8:51   ` Jan Beulich
  2016-12-22 11:16     ` Wei Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2016-12-22  8:51 UTC (permalink / raw)
  To: Wei Liu
  Cc: Stefano Stabellini, George Dunlap, Andrew Cooper, Ian Jackson,
	Tim Deegan, Xen-devel

>>> On 21.12.16 at 17:44, <wei.liu2@citrix.com> wrote:
> --- a/Config.mk
> +++ b/Config.mk
> @@ -19,7 +19,6 @@ or       = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$(
>  # A debug build of tools?
>  # Hypervisor debug build is controlled by Kconfig.
>  debug ?= y
> -debug_symbols ?= $(debug)

Wouldn't it be possible and make sense to move "debug" at once?

Jan


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] build: move debug_symbols to tools/Rules.mk
  2016-12-22  8:51   ` Jan Beulich
@ 2016-12-22 11:16     ` Wei Liu
  0 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2016-12-22 11:16 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Xen-devel

On Thu, Dec 22, 2016 at 01:51:28AM -0700, Jan Beulich wrote:
> >>> On 21.12.16 at 17:44, <wei.liu2@citrix.com> wrote:
> > --- a/Config.mk
> > +++ b/Config.mk
> > @@ -19,7 +19,6 @@ or       = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$(
> >  # A debug build of tools?
> >  # Hypervisor debug build is controlled by Kconfig.
> >  debug ?= y
> > -debug_symbols ?= $(debug)
> 
> Wouldn't it be possible and make sense to move "debug" at once?
> 

Fine by me.

Wei.

> Jan
> 

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-12-22 11:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-21 16:43 [PATCH 0/2] build: minor adjustment Wei Liu
2016-12-21 16:44 ` [PATCH 1/2] build: move debug_symbols to tools/Rules.mk Wei Liu
2016-12-22  8:51   ` Jan Beulich
2016-12-22 11:16     ` Wei Liu
2016-12-21 16:44 ` [PATCH 2/2] build: use debug_symbols to add -g3 Wei Liu

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.