From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJBN8-0003zn-GN for qemu-devel@nongnu.org; Tue, 23 Jun 2009 15:09:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJBN2-0003s0-DQ for qemu-devel@nongnu.org; Tue, 23 Jun 2009 15:09:33 -0400 Received: from [199.232.76.173] (port=59888 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJBN2-0003rn-3a for qemu-devel@nongnu.org; Tue, 23 Jun 2009 15:09:28 -0400 Received: from mail-gx0-f207.google.com ([209.85.217.207]:61050) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJBN1-00077I-Om for qemu-devel@nongnu.org; Tue, 23 Jun 2009 15:09:27 -0400 Received: by gxk3 with SMTP id 3so1000041gxk.10 for ; Tue, 23 Jun 2009 12:09:26 -0700 (PDT) Message-ID: <4A41285F.40705@codemonkey.ws> Date: Tue, 23 Jun 2009 14:09:19 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com Cc: qemu-devel@nongnu.org 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. 2) This involve no additional #ifdefs in the code 3) In the Makefiles, instead of having ifdef conditionals, we do: objs-$(CONFIG_FOO) += foo.o The block/ drivers are the model here. If you drop individual files from the build, it Just Works. Regards, Anthony Liguori