From patchwork Tue Apr 28 14:40:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 465591 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 78D9B14016A for ; Wed, 29 Apr 2015 00:48:19 +1000 (AEST) Received: from localhost ([::1]:33848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn6o5-0006Gz-M2 for incoming@patchwork.ozlabs.org; Tue, 28 Apr 2015 10:48:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn6hI-0007z6-FF for qemu-devel@nongnu.org; Tue, 28 Apr 2015 10:41:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yn6hE-0001CB-Gi for qemu-devel@nongnu.org; Tue, 28 Apr 2015 10:41:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn6hE-0001By-9k for qemu-devel@nongnu.org; Tue, 28 Apr 2015 10:41:12 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3SEf9pQ003318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 28 Apr 2015 10:41:09 -0400 Received: from donizetti.redhat.com (ovpn-112-80.ams2.redhat.com [10.36.112.80]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3SEeTdM013668; Tue, 28 Apr 2015 10:41:07 -0400 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 28 Apr 2015 16:40:26 +0200 Message-Id: <1430232029-9457-20-git-send-email-pbonzini@redhat.com> In-Reply-To: <1430232029-9457-1-git-send-email-pbonzini@redhat.com> References: <1430232029-9457-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Wei Liu Subject: [Qemu-devel] [PULL 19/22] Makefile.target: prepend $libs_softmmu to $LIBS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Wei Liu I discovered a problem when trying to build QEMU statically with gcc. libm is an element of LIBS while libpixman-1 is an element in libs_softmmu. Libpixman references functions in libm, so the original ordering makes linking fail. This fix is to reorder $libs_softmmu and $LIBS to make -lm appear after -lpixman-1. However I'm not quite sure if this is the right fix, hence the RFC tag. Normally QEMU is built with c++ compiler which happens to link in libm (at least this is the case with g++), so building QEMU statically normally just works and nobody notices this issue. Signed-off-by: Wei Liu Message-Id: <1425912873-21215-1-git-send-email-wei.liu2@citrix.com> Signed-off-by: Paolo Bonzini --- Makefile.target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.target b/Makefile.target index 2262d89..1083377 100644 --- a/Makefile.target +++ b/Makefile.target @@ -134,7 +134,7 @@ obj-$(CONFIG_KVM) += kvm-all.o obj-y += memory.o savevm.o cputlb.o obj-y += memory_mapping.o obj-y += dump.o -LIBS+=$(libs_softmmu) +LIBS := $(libs_softmmu) $(LIBS) # xen support obj-$(CONFIG_XEN) += xen-common.o