Message ID | 1482495858-4334-4-git-send-email-wei.liu2@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
>>> On 23.12.16 at 13:24, <wei.liu2@citrix.com> wrote: > @@ -146,7 +146,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 I think you want to also adjust the comment then. Jan
On Tue, Jan 03, 2017 at 02:07:31AM -0700, Jan Beulich wrote: > >>> On 23.12.16 at 13:24, <wei.liu2@citrix.com> wrote: > > @@ -146,7 +146,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 > > I think you want to also adjust the comment then. > I think I will just change the comment to: # Disable optimizations Wei.
Wei Liu writes ("Re: [PATCH v2 2/2] build: use debug_symbols to add -g3"): > On Tue, Jan 03, 2017 at 02:07:31AM -0700, Jan Beulich wrote: > > On 23.12.16 at 13:24, <wei.liu2@citrix.com> wrote: > > > @@ -146,7 +146,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 > > > > I think you want to also adjust the comment then. > > > > I think I will just change the comment to: > > # Disable optimizations With that change, Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
diff --git a/tools/Rules.mk b/tools/Rules.mk index 9a87f18..c8386b1 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -31,7 +31,7 @@ debug ?= y debug_symbols ?= $(debug) ifeq ($(debug_symbols),y) -CFLAGS += -g +CFLAGS += -g3 endif ifneq ($(nosharedlibs),y) @@ -146,7 +146,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
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(-)