Received: from eggs.gnu.org ([2001:4830:134:3::10]:52751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUAOp-00076k-Gd for qemu-devel@nongnu.org; Mon, 01 Aug 2016 06:24:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUAOl-0006B1-91 for qemu-devel@nongnu.org; Mon, 01 Aug 2016 06:24:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUAOl-0006Ao-3m for qemu-devel@nongnu.org; Mon, 01 Aug 2016 06:24:39 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 777BF883A1 for ; Mon, 1 Aug 2016 10:24:38 +0000 (UTC) References: <1469600777-30413-1-git-send-email-famz@redhat.com> <1469600777-30413-2-git-send-email-famz@redhat.com> From: Paolo Bonzini Message-ID: <3cc9fb6e-512b-f025-78c0-7bb40e99493a@redhat.com> Date: Mon, 1 Aug 2016 12:24:35 +0200 MIME-Version: 1.0 In-Reply-To: <1469600777-30413-2-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for 2.8 1/3] rules.mak: Don't extract libs from .mo-libs in link command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Colin Lord , Gerd Hoffmann On 27/07/2016 08:26, Fam Zheng wrote: > For module build, .mo objects are passed to LINK and consumed in > process-archive-undefs. The reason behind that is documented in the > comment above process-archive-undefs. > > Similarly, extract-libs should be called with .mo filtered out too. > Otherwise, the .mo-libs are added to the link command incorrectly, > spoiling the purpose of modularization. > > Currently we don't have any .mo-libs usage, but it will be used soon > when we modularize more multi-source objects, like sdl and gtk. > > Reported-by: Colin Lord > Signed-off-by: Fam Zheng > --- > rules.mak | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/rules.mak b/rules.mak > index ed8e482..80705a7 100644 > --- a/rules.mak > +++ b/rules.mak > @@ -50,7 +50,7 @@ process-archive-undefs = $(filter-out %.a %.mo,$1) \ > $(call undefined-symbols,$(filter %.mo,$1)))) \ > $(filter %.a,$1) > > -extract-libs = $(strip $(foreach o,$1,$($o-libs))) > +extract-libs = $(strip $(foreach o,$(filter-out %.mo,$1),$($o-libs))) > expand-objs = $(strip $(sort $(filter %.o,$1)) \ > $(foreach o,$(filter %.mo,$1),$($o-objs)) \ > $(filter-out %.o %.mo,$1)) > Acked-by: Paolo Bonzini Paolo