From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyQ7R-0002wd-0G for qemu-devel@nongnu.org; Tue, 30 Aug 2011 11:20:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QyQ7P-0003nF-Lo for qemu-devel@nongnu.org; Tue, 30 Aug 2011 11:20:52 -0400 Received: from e8.ny.us.ibm.com ([32.97.182.138]:60965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyQ7P-0003mg-JP for qemu-devel@nongnu.org; Tue, 30 Aug 2011 11:20:51 -0400 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by e8.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p7UF6ob1025193 for ; Tue, 30 Aug 2011 11:06:50 -0400 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p7UFKke8184724 for ; Tue, 30 Aug 2011 11:20:46 -0400 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p7UFKO99027282 for ; Tue, 30 Aug 2011 09:20:24 -0600 Message-ID: <4E5CFFB6.8000801@linux.vnet.ibm.com> Date: Tue, 30 Aug 2011 10:20:22 -0500 From: Michael Roth MIME-Version: 1.0 References: <4E5BE7AF.5020906@linux.vnet.ibm.com> <1314646068-31438-1-git-send-email-mdroth@linux.vnet.ibm.com> <8762lfksyv.fsf@ginnungagap.bsc.es> In-Reply-To: <8762lfksyv.fsf@ginnungagap.bsc.es> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Add CONFIG_QEMU_TIMER to handle qemu-timer-common.o dep List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xscript@gmx.net Cc: Blue Swirl , Stefan Hajnoczi , qemu-devel@nongnu.org On 08/30/2011 07:02 AM, Llu=C3=ADs wrote: > Stefan Hajnoczi writes: > >> On Mon, Aug 29, 2011 at 8:27 PM, Michael Roth wrote: >>> @@ -380,7 +381,6 @@ else >>> trace-obj-y =3D trace.o >>> ifeq ($(TRACE_BACKEND),simple) >>> trace-obj-y +=3D simpletrace.o >>> -user-obj-y +=3D 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 +=3D qemu-timer-common.o together wit= h >> $(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 othe= r > than '$(sort)' or calling an external command with '$(shell)'. Hmm, looking again I'm confused why we need to do this in the first=20 place...the rule is: LINK =3D $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -= o=20 $@ $(1) $(LIBS)," LINK $(TARGET_DIR)$@") %$(EXESUF): %.o $(call LINK,$^) According to the documentation $^ should remove duplicate dependencies,=20 so I'm not getting why we need to de-dupe them once they get passed to LI= NK: http://www.gnu.org/software/make/manual/make.html#index-g_t_0024_005e-948 Is there some distinction between duplicate dependencies and duplicate=20 words in the dependency list? > > > Lluis >