From patchwork Tue Nov 20 00:31:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 1769821 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id BDA28DF264 for ; Tue, 20 Nov 2012 00:32:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753219Ab2KTAcI (ORCPT ); Mon, 19 Nov 2012 19:32:08 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:19041 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752906Ab2KTAcH (ORCPT ); Mon, 19 Nov 2012 19:32:07 -0500 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qAK0W2I1006606 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 20 Nov 2012 00:32:03 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qAK0W1ld026320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Nov 2012 00:32:02 GMT Received: from abhmt116.oracle.com (abhmt116.oracle.com [141.146.116.68]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qAK0W1Vn024861; Mon, 19 Nov 2012 18:32:01 -0600 Received: from lappy.hsd1.ma.comcast.net. (/50.133.228.71) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Nov 2012 16:32:00 -0800 From: Sasha Levin To: penberg@kernel.org Cc: asias@redhat.com, kvm@vger.kernel.org, rminnich@gmail.com, Sasha Levin Subject: [PATCH] kvm tools: disable LTO by default Date: Mon, 19 Nov 2012 19:31:30 -0500 Message-Id: <1353371490-892-1-git-send-email-sasha.levin@oracle.com> X-Mailer: git-send-email 1.8.0 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 Signed-off-by: Sasha Levin --- 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)