build: minor adjustment
v2 cover build: minor adjustment
Wei Liu (2):
build: move debug{,_symbols} to tools/Rules.mk
build: use debug_symbols to add -g3
Config.mk | 9 --------- tools/Rules.mk | 10 +++++++++- 2 files changed, 9 insertions(+), 10 deletions(-)
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH v2 1/1 build: move setting LTO options to xen/Rules.mk
Having them in StdGNU.mk would affect both hypervisor and tools build. However judging from the commit message of e4cdd74f LTO was only meant to affect hypvervisor build.
Move the relevant bits to xen/Rules.mk.
---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>
--- config/StdGNU.mk | 4 ---- xen/Rules.mk | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-)
config/StdGNU.mk +0 -4
@@ -35,7 +35,3 @@ UTIL_LIBS = -lutil SONAME_LDFLAG = -soname SHLIB_LDFLAGS = -shared -ifeq ($(lto),y) -CFLAGS += -flto -LDFLAGS-$(clang) += -plugin LLVMgold.so -endif
xen/Rules.mk +2 -0
@@ -120,6 +120,8 @@ $(filter-out %.init.o $(nogcov-y),$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += - endif ifeq ($(CONFIG_LTO),y) +CFLAGS += -flto +LDFLAGS-$(clang) += -plugin LLVMgold.so # Would like to handle all object files as bitcode, but objects made from # pure asm are in a different format and have to be collected separately. # Mirror the directory tree, collecting them as built_in_bin.o.
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH v2] build: move setting LTO options to xen/Rules.mk
Quoted 6 lines · Wei Liu
Having them in StdGNU.mk would affect both hypervisor and tools build. However judging from the commit message of
e4cdd74fLTO was only meant to affect hypvervisor build.Move the relevant bits to
xen/Rules.mk.
Ah, git send-email *.patch -- please ignore this patch in this series.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH v2 1/2 build: move debug{, _symbols} to tools/Rules.mk
In reply to Wei Liu31d41d7b tried to make debug affect tools build only but failed to take care of debug_symbols (which appends "-g" to CFLAGS).
Move both to tools/Rules.mk at once in this patch.
---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>
--- Config.mk | 9 --------- tools/Rules.mk | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-)
Config.mk +0 -9
@@ -16,11 +16,6 @@ or = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$( -include $(XEN_ROOT)/.config -# 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/ \ -e s/armv7.*/arm32/ -e s/armv8.*/arm64/ \
@@ -211,10 +206,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
tools/Rules.mk +8 -0
@@ -26,6 +26,14 @@ CFLAGS_xeninclude = -I$(XEN_INCLUDE) XENSTORE_XENSTORED ?= y +# A debug build of tools? +debug ?= y +debug_symbols ?= $(debug) + +ifeq ($(debug_symbols),y) +CFLAGS += -g +endif + ifneq ($(nosharedlibs),y) INSTALL_SHLIB = $(INSTALL_PROG) SYMLINK_SHLIB = ln -sf
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH v2 1/2] build: move debug{, _symbols} to tools/Rules.mk
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 23.12.16 at 13:24, <[email protected]> wrote:
31d41d7btried to make debug affect tools build only but failed to take care ofdebug_symbols(which appends "-g" to CFLAGS).Move both to
tools/Rules.mkat once in this patch.Signed-off-by Wei Liu <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH v2 2/2 build: use debug_symbols to add -g3
In reply to Wei LiuWhile 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.
---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>
--- tools/Rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/Rules.mk +2 -2
@@ -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
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH v2 2/2] build: use debug_symbols to add -g3
tools/Rules.mk SHLIB_libxenvchan = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN) · line 149
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 23.12.16 at 13:24, <[email protected]> wrote:
tools/Rules.mk +1
-1@@ -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
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v2 2/2] build: use debug_symbols to add -g3
Quoted 10 lines · Jan Beulich
tools/Rules.mk SHLIB_libxenvchan = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN) · line 149
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 23.12.16 at 13:24, <[email protected]> wrote:
tools/Rules.mk +1
-1@@ -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-pointerI think you want to also adjust the comment then.
I think I will just change the comment to:
# Disable optimizations
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Ian Jackson
Acked-byRe: [PATCH v2 2/2] build: use debug_symbols to add -g3
Wei Liu writes ("Re: [PATCH v2 2/2] build: use debug_symbols to add -g3"):
Quoted 12 lines · Jan Beulich
Quoted 10 lines · On 23.12.16 at 13:24, <[email protected]> wrote:
tools/Rules.mk SHLIB_libxenvchan = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN) · line 149
Quoted 6 lines
tools/Rules.mk +1
-1@@ -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-pointerI think you want to also adjust the comment then.
Quoted 3 lines
I think I will just change the comment to:
# Disable optimizations
With that change,
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel