From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MU1iY-0000zR-PC for qemu-devel@nongnu.org; Thu, 23 Jul 2009 13:04:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MU1iS-0000xK-JP for qemu-devel@nongnu.org; Thu, 23 Jul 2009 13:04:29 -0400 Received: from [199.232.76.173] (port=59511 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MU1iS-0000xD-E6 for qemu-devel@nongnu.org; Thu, 23 Jul 2009 13:04:24 -0400 Received: from mail-qy0-f174.google.com ([209.85.221.174]:50843) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MU1iS-0006gs-3A for qemu-devel@nongnu.org; Thu, 23 Jul 2009 13:04:24 -0400 Received: by qyk4 with SMTP id 4so1360156qyk.4 for ; Thu, 23 Jul 2009 10:04:23 -0700 (PDT) Message-ID: <4A689814.6040707@codemonkey.ws> Date: Thu, 23 Jul 2009 12:04:20 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable References: <200907231036.29505.paul@codesourcery.com> <878wifwd9y.fsf@pike.pond.sub.org> In-Reply-To: <878wifwd9y.fsf@pike.pond.sub.org> 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: Markus Armbruster Cc: qemu-devel@nongnu.org, Paolo Bonzini , Paul Brook , Juan Quintela Markus Armbruster wrote: > 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. > It's never followed verbatim though and we'll likely invoke CPP is usually just gcc -E. We can't enforce a hard split between CPPFLAGS and CFLAGS when we use things like pkg-config, --cflags only gives us one set of flags. Likewise, it's hard to separate LDFLAGS from LDLIBS too for the same reason. Regards, Anthony Liguori