Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTf2p-0004Lu-EH for qemu-devel@nongnu.org; Wed, 22 Jul 2009 12:51:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTf2k-00047B-9u for qemu-devel@nongnu.org; Wed, 22 Jul 2009 12:51:54 -0400 Received: from [199.232.76.173] (port=38769 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTf2k-00046S-52 for qemu-devel@nongnu.org; Wed, 22 Jul 2009 12:51:50 -0400 In-Reply-To: <4A673FE4.20903@gnu.org> (Paolo Bonzini's message of "Wed\, 22 Jul 2009 18\:35\:48 +0200") References: <4A673FE4.20903@gnu.org> From: Juan Quintela Date: Wed, 22 Jul 2009 18:51:37 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Paolo Bonzini wrote: >> ToDo: >> - Make the same treatment for CFLAGS, CPPFLAGS and LDFLAGS. > > Cool! For CFLAGS and CPPFLAGS, however, I'd suggest moving all flags > that are necessary to build (such as -I as opposed to just -O, -g and > the like) to QEMU_CFLAGS and QEMU_CPPFLAGS. This way rebuilding > without optimization can be done very easily. My idea hera is to do diferently. Actually he have a very confusing use of CFLAGS. My idea is: --extra-cflags: remove it, we can use: CFLAGS="foo bar" ./configure (it is not there yet, but we can do it) And we can use in each place that we modify CFLAGS: CFLAGS="more stuff $CFLAGS" Notice that the stuff that we invoked ./configure with comes last, as we wanted for EXTRA_CFLAGS. As an added bonus, we can compile all the tests in ./configure with that variable set. As for compiling a file with different options, we want something like that for Makefile, i.e. make all rm foo.o make CFLAGS=-O0 foo.o compile with -O0 as last option, that way we can "overwrite" the -O2 that came from the config-hosts.mak Doing the configure bits are easy (just work), as for the Makefile stuff, instead of having CFLAGS+=foo printed on config-hosts.mak just print: CFLAGS=foo $(CFLAGS) should make the trick. We got more functionality that we have today, and we can: - remove extra-cflags - we don't need to OPT= variable that Blue Swirl wanted What do you think? Later, Juan.