From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWYAZ-0007EN-BL for qemu-devel@nongnu.org; Thu, 30 Jul 2009 12:07:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWYAU-00077e-4w for qemu-devel@nongnu.org; Thu, 30 Jul 2009 12:07:50 -0400 Received: from [199.232.76.173] (port=37875 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWYAT-00077L-Tr for qemu-devel@nongnu.org; Thu, 30 Jul 2009 12:07:45 -0400 Date: Thu, 30 Jul 2009 17:07:17 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [PATCH 30/42] Rename CPPFLAGS to CFLAGS Message-ID: <20090730160717.GC28242@shareable.org> References: <4A7144A6.5060704@gnu.org> <4A7166FA.9070401@gnu.org> <4A716BCA.4050304@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: Paolo Bonzini , aliguori@us.ibm.com, qemu-devel@nongnu.org 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 -- Jamie