Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWYT4-0000sM-Jx for qemu-devel@nongnu.org; Thu, 30 Jul 2009 12:26:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWYT0-0000lV-AE for qemu-devel@nongnu.org; Thu, 30 Jul 2009 12:26:58 -0400 Received: from [199.232.76.173] (port=60917 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWYSz-0000l4-US for qemu-devel@nongnu.org; Thu, 30 Jul 2009 12:26:53 -0400 In-Reply-To: <20090730160717.GC28242@shareable.org> (Jamie Lokier's message of "Thu\, 30 Jul 2009 17\:07\:17 +0100") References: <4A7144A6.5060704@gnu.org> <4A7166FA.9070401@gnu.org> <4A716BCA.4050304@gnu.org> <20090730160717.GC28242@shareable.org> From: Juan Quintela Date: Thu, 30 Jul 2009 18:24:53 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 30/42] Rename CPPFLAGS to CFLAGS List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: Paolo Bonzini , aliguori@us.ibm.com, qemu-devel@nongnu.org Jamie Lokier wrote: > Juan Quintela wrote: >> Paolo Bonzini wrote: >> >> Ok, and what are that options? >> >> Looking at today Makefiles, the only things that I see that the user >> >> could want changing is: >> >> -g >> >> -O2 >> >> -fno-strict-aliasing >> >> -fno-unit-at-a-time (ppc) >> >> -msmall-data (alpha) >> >> -mno-sdata (ia64) >> >> >> >> Rest of things are -I/-D stuff, that you don't want to touch from the >> >> command line at all. >> >> Ok, with me, then the proposal is: >> rename CFLAGS into QEMU_CFLAGS >> leave in CFLAGS only "-g -O2" > > A good trick is to make sure CFLAGS is included at the _end_ of > QEMU_CFLAGS (or that it comes after QEMU_FLAGS in commands), not > anywhere else: > > CFLAGS = -g -O2 > QEMU_CFLAGS = -msome-option -fno-strict-aliasing $(CFLAGS) > > This way, users can override many options in QEMU_CFLAGS if they have > reason to, by supplying the opposite flag, as options coming later > usually have precedence: > > make CFLAGS='-g -O2 -fstrict-aliasing' > > ==> gcc -msome-option -fno-strict-alising -g -O2 -fstrict-aliasing <- wins That is already done, I moved carefully to always prepend things. Whatever that you put in --extra-cflags goes at the end of the line. Later, Juan.