Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MU1b4-00062v-DN for qemu-devel@nongnu.org; Thu, 23 Jul 2009 12:56:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MU1b0-00060Q-VJ for qemu-devel@nongnu.org; Thu, 23 Jul 2009 12:56:46 -0400 Received: from [199.232.76.173] (port=60023 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MU1b0-00060N-NN for qemu-devel@nongnu.org; Thu, 23 Jul 2009 12:56:42 -0400 Subject: Re: [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable References: <200907231036.29505.paul@codesourcery.com> From: Markus Armbruster Date: Thu, 23 Jul 2009 18:54:33 +0200 In-Reply-To: (Juan Quintela's message of "Thu\, 23 Jul 2009 17\:45\:57 +0200") Message-ID: <878wifwd9y.fsf@pike.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: Paolo Bonzini , Paul Brook , qemu-devel@nongnu.org Juan Quintela writes: > Paul Brook wrote: >>> I tend to think that using the same libraries for all binaries is a good >>> idea, but I think we shouldn't confuse the isues. >> >> Usermode and full system emulation are completely different applications. It >> makes no sense to use the same set of libraries. > > Ok, switching to: > > libs : for everything > libs_softmmu > libs_linux > libs_bsd > libs_darwin > > ldflags <- similar, not a big problem > > CFLAGS/CPPFLAGS, this is a whole different can of worms > > As of know, we have: > - OS_FLAGS > - ARCH_FLAGS > - CFLAGS > - CPPFLAGS > - CFLAGS for specific files (KVM_CFLAGS and similars) > - CFLAGS for some libs that got compiled all files with > - HELPER_CFLAGS > - SP_FLAGS (already killed on my patches, it is know part of ARCH_FLAGS) > - EXTRA_CFLAGS > > Starting in configure, which flags are used for each test: random mix of > CFLAGS + EXTRA_CFLAGS + OS_FLAGS + ARCH_FLAGS > > Clearly, not an ideal solution. > > What we want to be able to do: > a- let the user add CFLAGS to all the tests and build > b- let the user overwrote CFLAGS generated by ./configure + Makefile > c- the several files be compiled with diffrent CFLAGS > d- let the user change the CFLAGS for a specific file from command line > make; rm foo.o; make CFLAGS="" > > Solution so far: > > CPPFLAGS is for stuff that you "really" need, i.e. include paths and > Defines > CFLAGS is for the rest of options, that can be "removed" Actually, CPPFLAGS is for preprocessor stuff, and CFLAGS for the rest. > My proposal: > > To fix the issues: > > a: CFLAGS="-Dfoo -Ivar" ./configure > Do what you expect, basically be carefull in configure to allways do > CFLAGS=" $CFLAGS" for things that used to go in OS_FLAGS + > CFLAGS + ARCH_CFLAGS > Be careful about what we put into CFLAGS/CPPFLAGS > > b: is solved with previous approach,if you do > CFLAGS=" remove it. > c: use one of the current approach, > foo.o: CFLAGS := $(CFLAGS) $(FOO_CFLAGS) (only one case of this one) > foo.o: CFLAGS += $(FOO_FLAGS) > > > d: if we do the FOO_FLAGS in CPPFLAGS, now > make CFLAGS="-O0" > or other changes work as expected. > > WHat do you think? > > Later, Juan. If that means putting non-preprocessing stuff into CPPFLAGS, then it's unusual use of common make variables, and a such a trap for the unwary. Do we care?