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

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


  • To: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU <vlad_andrei.badoiu@xxxxxx>
  • Date: Thu, 4 Feb 2021 20:22:32 +0200 (EET)
  • Cc: minios-devel <minios-devel@xxxxxxxxxxxxx>
  • Delivery-date: Thu, 04 Feb 2021 18:22:47 +0000
  • Dkim-filter: OpenDKIM Filter v2.10.3 mx.upb.ro AB36EB560072
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: 6Z+f/2Tv/1FFSK0tI7tix7YU5AXRTQ==
  • Thread-topic: build/lto: Support LTO on gcc-10

Hi Sharan,

Thank you, works great!

Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxx>

----- Original Message -----
From: "Sharan Santhanam" <sharan.santhanam@xxxxxxxxx>
To: "minios-devel" <minios-devel@xxxxxxxxxxxxx>
Cc: "Sharan Santhanam" <sharan.santhanam@xxxxxxxxx>
Sent: Thursday, February 4, 2021 8:12:16 PM
Subject: [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®.