[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT PATCH v2 2/2] build/lto: Support LTO on gcc-10



To support LTO with incremental builds, we need to add the
`-flinker-output=nolto-rel` linker flag.

Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>
---
 Makefile.uk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile.uk b/Makefile.uk
index c3bb361..a88d512 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -58,4 +58,6 @@ COMPFLAGS-$(call gcc_version_ge,6,1)  += -fno-PIC
 LDFLAGS-$(call gcc_version_ge,6,1)     += -no-pie
 ifeq ($(call gcc_version_ge,10,0),y)
 COMPFLAGS-y += -fhosted -ffreestanding -fno-tree-loop-distribute-patterns
+LIBLDFLAGS-$(CONFIG_OPTIMIZE_LTO) += -flinker-output=nolto-rel
+LDFLAGS-$(CONFIG_OPTIMIZE_LTO) += -flinker-output=nolto-rel
 endif
-- 
2.7.4




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.