[PATCH] kvm tools: disable LTO by default

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

 



A bug only seen with LTO enabled was reported by Ron Minnich. Since the issue
appears to be a linker issue, we disable LTO by default until it's more stable.

We can still run LTO builds by setting LTO=1.

Reported-by: Ron Minnich <rminnich@xxxxxxxxx>
Signed-off-by: Sasha Levin <sasha.levin@xxxxxxxxxx>
---
 tools/kvm/Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile
index c105de1..de11060 100644
--- a/tools/kvm/Makefile
+++ b/tools/kvm/Makefile
@@ -221,9 +221,11 @@ ifeq ($(call try-cc,$(SOURCE_AIO),$(FLAGS_AIO) -static),y)
 	LIBS_STATOPT	+= -laio
 endif
 
-FLAGS_LTO := -flto
-ifeq ($(call try-cc,$(SOURCE_HELLO),$(FLAGS_LTO)),y)
-	CFLAGS		+= $(FLAGS_LTO)
+ifeq ($(LTO),1)
+	FLAGS_LTO := -flto
+	ifeq ($(call try-cc,$(SOURCE_HELLO),$(FLAGS_LTO)),y)
+		CFLAGS		+= $(FLAGS_LTO)
+	endif
 endif
 
 ifneq ($(call try-build,$(SOURCE_STATIC),-static,),y)
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux