From patchwork Tue Aug 2 15:07:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: clord@redhat.com X-Patchwork-Id: 9258017 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0DBEA6077C for ; Tue, 2 Aug 2016 15:08:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F168D28536 for ; Tue, 2 Aug 2016 15:08:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E296A28544; Tue, 2 Aug 2016 15:08:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8415928536 for ; Tue, 2 Aug 2016 15:08:04 +0000 (UTC) Received: from localhost ([::1]:57192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUbIZ-0002KC-Bq for patchwork-qemu-devel@patchwork.kernel.org; Tue, 02 Aug 2016 11:08:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUbI1-0002GJ-86 for qemu-devel@nongnu.org; Tue, 02 Aug 2016 11:07:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUbHu-0003HH-FU for qemu-devel@nongnu.org; Tue, 02 Aug 2016 11:07:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUbHu-0003HC-9p for qemu-devel@nongnu.org; Tue, 02 Aug 2016 11:07:22 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (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 DF6E24481C for ; Tue, 2 Aug 2016 15:07:21 +0000 (UTC) Received: from dhcp-17-138.bos.redhat.com (dhcp-17-209.bos.redhat.com [10.18.17.209]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u72F7Ks5023842; Tue, 2 Aug 2016 11:07:21 -0400 From: Colin Lord To: qemu-devel@nongnu.org Date: Tue, 2 Aug 2016 11:07:18 -0400 Message-Id: <1470150439-28468-2-git-send-email-clord@redhat.com> In-Reply-To: <1470150439-28468-1-git-send-email-clord@redhat.com> References: <1470150439-28468-1-git-send-email-clord@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 02 Aug 2016 15:07:21 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/2] rules.mak: Don't extract libs from .mo-libs in link command X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, Fam Zheng , kraxel@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- rules.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules.mak b/rules.mak index 99cd0b3..1211649 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))