qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Colin Lord <clord@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, kraxel@redhat.com, Fam Zheng <famz@redhat.com>
Subject: [Qemu-devel] [PATCH 1/2] rules.mak: Don't extract libs from .mo-libs in link command
Date: Tue,  2 Aug 2016 11:07:18 -0400	[thread overview]
Message-ID: <1470150439-28468-2-git-send-email-clord@redhat.com> (raw)
In-Reply-To: <1470150439-28468-1-git-send-email-clord@redhat.com>

From: Fam Zheng <famz@redhat.com>

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 <clord@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 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))
-- 
2.5.5

  reply	other threads:[~2016-08-02 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02 15:07 [Qemu-devel] [PATCH 0/2] Modularize GTK Display Colin Lord
2016-08-02 15:07 ` Colin Lord [this message]
2016-08-02 15:07 ` [Qemu-devel] [PATCH 2/2] gtk: Modularize GTK display Colin Lord
2016-08-03  8:26   ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470150439-28468-2-git-send-email-clord@redhat.com \
    --to=clord@redhat.com \
    --cc=famz@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).