Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJX3Z-000562-HW for qemu-devel@nongnu.org; Wed, 24 Jun 2009 14:18:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJX3U-00050q-DT for qemu-devel@nongnu.org; Wed, 24 Jun 2009 14:18:48 -0400 Received: from [199.232.76.173] (port=54189 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJX3U-0004zz-7A for qemu-devel@nongnu.org; Wed, 24 Jun 2009 14:18:44 -0400 Received: from mx20.gnu.org ([199.232.41.8]:23721) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MJX3S-0003Gk-LK for qemu-devel@nongnu.org; Wed, 24 Jun 2009 14:18:43 -0400 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJX3O-0002Q3-SZ for qemu-devel@nongnu.org; Wed, 24 Jun 2009 14:18:39 -0400 In-Reply-To: <4A41285F.40705@codemonkey.ws> (Anthony Liguori's message of "Tue\, 23 Jun 2009 14\:09\:19 -0500") References: <4A41285F.40705@codemonkey.ws> From: Juan Quintela Date: Wed, 24 Jun 2009 20:17:10 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [RFC PATCH 00/15] Be able to compile out not needed options List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org Anthony Liguori wrote: > quintela@redhat.com wrote: >> From: Juan Quintela >> >> Hi >> >> this series of patches: >> a- move object files only used by one target to that target Makefile.target >> b- add flags to disable parts: --disable-{bluez,usb,vwmare,virtio,scsi} >> defaults is leave it enabled. You need to add the --disable-* flag to get any change >> c- disable the use of --smb >> >> What is the intent: we want to be able to not compile-in things that we are not >> interested in (they are experimental/not needed for our target/...). >> >> Is this the right approach? Should I do something different? >> >> For the next series, I am also interested on enable/disabling bits of a subsysem: >> being able to support usb-hid but not usb-{host,net,msnd}. I already have patches >> to disable that, just waiting to hear what is the preffered way to get >> that functionality. >> >> Known problems: >> - qemu-*.hx files don't run over cpp and then we are not able to remove from >> the help page the options that we don't support. >> - drive_hot_add without scsi support do nothing. >> >> Any comments? >> > > To me, there are a few fundamental requirements for this: > > 1) This be configurable via a .config file instead of via ./configure > options. We have config-hosts.mak. If we don't want to do it with ./configure, with what/how do you want it to happen. Do we agree in having: qemu/.config qemu/.config.mak target-*/.config target-*/.config.mak And remove Makefile.target (i.e. split it in the target directories). The problem that I saw otherwise with current approach is that it is difficult to have a module linked for one target and not for another. (No adding yet more ifdefs tricks is not a solution IMHO). > 2) This involve no additional #ifdefs in the code That is doable, if we agree that putting stub declarations in .h files is ok. I was following the "current style". > 3) In the Makefiles, instead of having ifdef conditionals, we do: > objs-$(CONFIG_FOO) += foo.o No problem with that for me if people agree in merging this solution. > The block/ drivers are the model here. If you drop individual files > from the build, it Just Works. But block/ drivers are _easy_ in this regard, you only have to register a struct, and they become available. USB/SCSI/... touch code in the middle of pc.c and the other platforms "machine" files. On the other hand, block implementation is not flexible enough for us yet (TM). We would like to be able to complie all block drivers for qemu-img and only some of them for qemu :) Will redo the patches with this (and the other people suggestions). Thank for the input, Juan. > Regards, > > Anthony Liguori