From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyP85-0004Bw-LH for qemu-devel@nongnu.org; Tue, 30 Aug 2011 10:17:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QyP84-0007B3-LN for qemu-devel@nongnu.org; Tue, 30 Aug 2011 10:17:29 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:37298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyP84-0007Am-Is for qemu-devel@nongnu.org; Tue, 30 Aug 2011 10:17:28 -0400 Received: by ywf9 with SMTP id 9so6347159ywf.4 for ; Tue, 30 Aug 2011 07:17:27 -0700 (PDT) Message-ID: <4E5CF0F4.2030208@codemonkey.ws> Date: Tue, 30 Aug 2011 09:17:24 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4E5BE7AF.5020906@linux.vnet.ibm.com> <1314646068-31438-1-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Stefan Hajnoczi Cc: blauwirbel@gmail.com, xscript@gmx.net, Michael Roth , qemu-devel@nongnu.org On 08/30/2011 04:22 AM, Stefan Hajnoczi wrote: > On Mon, Aug 29, 2011 at 8:27 PM, Michael Roth 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. Er, but qemu-timer cannot possibly be used by qemu-io/qemu-img. Is this all dummy magic in order to let qemu-io build even though simple tracing won't work? Perhaps we should look at making the tracing backends dynamic instead of static? Regards, Anthony Liguori > > Each subsystem should explicitly include its dependencies (e.g. > subsys-obj-y += qemu-timer-common.o or subsys-obj-y += > $(more-fundamental-subsys)) so that it can be easily used by a target. > If this is not done then there are two disadvantages: > 1. We spray dependency information across the makefiles instead of > keeping them contained with the subsystem that has the dependency > requirement. > 2. We duplicate the dependencies across each target in the form of > conditional objects: > x-obj-$(CONFIG_MY_DEPENDENCY) += ... > > 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. > > Stefan >