qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: xscript@gmx.net
Cc: Blue Swirl <blauwirbel@gmail.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Add CONFIG_QEMU_TIMER to handle qemu-timer-common.o dep
Date: Tue, 30 Aug 2011 10:20:22 -0500	[thread overview]
Message-ID: <4E5CFFB6.8000801@linux.vnet.ibm.com> (raw)
In-Reply-To: <8762lfksyv.fsf@ginnungagap.bsc.es>

On 08/30/2011 07:02 AM, Lluís wrote:
> Stefan Hajnoczi writes:
>
>> On Mon, Aug 29, 2011 at 8:27 PM, Michael Roth<mdroth@linux.vnet.ibm.com>  wrote:
>>> @@ -380,7 +381,6 @@ else
>>>   trace-obj-y = trace.o
>>>   ifeq ($(TRACE_BACKEND),simple)
>>>   trace-obj-y += simpletrace.o
>>> -user-obj-y += qemu-timer-common.o
>>>   endif
>>>   endif
>
>> Now that we have a concrete patch to look at I think this approach is
>> problematic.  There are several subsystems in QEMU which might be
>> built outside the main qemu binary for qemu-io, qemu-img, qemu-ga,
>> etc.
> [...]
>> If QEMU is split up into libraries then having an explicit list of
>> dependencies for each subsystem will be very useful, whereas the
>> CONFIG_* approach doesn't collect that information in one place.
>
>> So I think explicit subsys-obj-y += qemu-timer-common.o together with
>> $(sort) during the link stage actually allows for a cleaner build
>> system.  I prefer that approach.
>
> I couldn't agree more. The only problem I see with '$(sort)' is that it
> will invariably change the order of object files, which can influence
> code placement.
>
> Whether or not the spatial locality among compilation units is
> important, I don't know. Although I believe it won't have much of a
> performance penalty.
>
> In any case, I tried to find a straightforward way of filtering-out
> repeated words in a list with make, but couldn't find any solution other
> than '$(sort)' or calling an external command with '$(shell)'.

Hmm, looking again I'm confused why we need to do this in the first 
place...the rule is:

LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o 
$@ $(1) $(LIBS),"  LINK  $(TARGET_DIR)$@")

%$(EXESUF): %.o
     $(call LINK,$^)

According to the documentation $^ should remove duplicate dependencies, 
so I'm not getting why we need to de-dupe them once they get passed to LINK:

http://www.gnu.org/software/make/manual/make.html#index-g_t_0024_005e-948

Is there some distinction between duplicate dependencies and duplicate 
words in the dependency list?

>
>
> Lluis
>

  reply	other threads:[~2011-08-30 15:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26 18:45 [Qemu-devel] [PATCH 1/2] Fix guest agent build with simpletrace Blue Swirl
2011-08-26 19:12 ` Lluís
2011-08-27 16:46   ` Blue Swirl
2011-08-27 17:56     ` Lluís
2011-08-28  7:24       ` Blue Swirl
2011-08-28 18:13         ` Lluís
2011-08-28 21:08           ` Blue Swirl
2011-08-29 12:28             ` Stefan Hajnoczi
2011-08-29 19:25               ` Michael Roth
2011-08-29 19:27                 ` [Qemu-devel] [PATCH] Add CONFIG_QEMU_TIMER to handle qemu-timer-common.o dep Michael Roth
2011-08-30  9:22                   ` Stefan Hajnoczi
2011-08-30 12:02                     ` Lluís
2011-08-30 15:20                       ` Michael Roth [this message]
2011-08-30 18:32                         ` Lluís
2011-08-30 19:40                           ` Lluís
2011-08-30 14:17                     ` Anthony Liguori
2011-08-30 19:37                     ` Blue Swirl
2011-08-29 12:47             ` [Qemu-devel] [PATCH 1/2] Fix guest agent build with simpletrace Lluís

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=4E5CFFB6.8000801@linux.vnet.ibm.com \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=xscript@gmx.net \
    /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).