Skip to contentSkip to conversation

build: move setting LTO options to xen/Rules.mk

PATCH Superseded Wei Liu 4 participants 5 messages Dec 23, 2016 – Jan 5, 2017

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

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
index 6be8233..039274e 100644
@@ -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
index 24d13dc..77bcd44 100644
@@ -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
Reviewed-by
#2 lore raw
Quoted 9 lines · Wei Liu
Quoted 7 lines · Wei Liu

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.

Ping?

/me looks at the date and isn't surprised that this patch slipped through the cracks.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 05.01.17 at 16:23, <[email protected]> wrote:
Quoted 7 lines · Wei Liu
Quoted 6 lines · Wei Liu

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.

Quoted 7 lines
Quoted 2 lines
Quoted 1 line

Ping?

/me looks at the date and isn't surprised that this patch slipped through the cracks.

I don't even have a patch named like this in my inbox; the only thing I have is a 2-patch series titled "More fixes for lto option" from Dec 22nd.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Acked-by on v2 1/1
#4 lore raw
In reply to Wei Liu

Wei Liu writes ("[PATCH v2] build: move setting LTO options to xen/Rules.mk"):

Quoted 5 lines

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.

I think -flto is a very bad idea for the tools build and I think we should backport this change.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel