diff mbox

kvm tools: disable LTO by default

Message ID 1353371490-892-1-git-send-email-sasha.levin@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sasha Levin Nov. 20, 2012, 12:31 a.m. UTC
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@gmail.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
 tools/kvm/Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox

Patch

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)