From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjrLC-00080G-Ch for qemu-devel@nongnu.org; Tue, 13 Sep 2016 13:17:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjrLB-0005HK-An for qemu-devel@nongnu.org; Tue, 13 Sep 2016 13:17:50 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjrLB-0005GF-5K for qemu-devel@nongnu.org; Tue, 13 Sep 2016 13:17:49 -0400 Received: by mail-wm0-f68.google.com with SMTP id g141so8268002wmd.1 for ; Tue, 13 Sep 2016 10:17:49 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 13 Sep 2016 19:15:44 +0200 Message-Id: <1473786989-54823-14-git-send-email-pbonzini@redhat.com> In-Reply-To: <1473786989-54823-1-git-send-email-pbonzini@redhat.com> References: <1473786989-54823-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 13/58] 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: qemu-devel@nongnu.org Cc: Fam Zheng From: Fam Zheng 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 Message-Id: <1469600777-30413-2-git-send-email-famz@redhat.com> Signed-off-by: Paolo Bonzini --- rules.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules.mak b/rules.mak index 55b0121..5c82c19 100644 --- a/rules.mak +++ b/rules.mak @@ -51,7 +51,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)) -- 1.8.3.1