From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mm8eA-0005MO-Os for qemu-devel@nongnu.org; Fri, 11 Sep 2009 12:06:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mm8e5-0005KP-OY for qemu-devel@nongnu.org; Fri, 11 Sep 2009 12:06:50 -0400 Received: from [199.232.76.173] (port=56078 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mm8e5-0005KL-KC for qemu-devel@nongnu.org; Fri, 11 Sep 2009 12:06:45 -0400 Received: from mail.corp.accelance.fr ([213.162.48.15]:61236) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mm8e5-0007Li-EU for qemu-devel@nongnu.org; Fri, 11 Sep 2009 12:06:45 -0400 From: Thomas Monjalon Date: Fri, 11 Sep 2009 18:06:39 +0200 References: <200909092236.n89MaDVS020267@d01av01.pok.ibm.com> <200909111744.37066.thomas@monjalon.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909111806.39520.thomas@monjalon.net> Subject: [Qemu-devel] Re: [COMMIT 8a2e6ab] Remove CFLAGS parameter in cc-option List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: Anthony Liguori , qemu-devel@nongnu.org Juan Quintela wrote: > Thomas Monjalon wrote: > > Anthony Liguori wrote: > >> What I'd prefer is for someone to figure out the root cause of += not > >> working for us. If we can't, I'd like a big fat comment stating that > >> it's a known deficiency and we'll move on. > > > > "make" complains about an infinite recursive assignment because the first > > assignment of CFLAGS defines a recursively-expanded variable and the > > right value is a macro which uses the CFLAGS. > > > > As explained in > > http://www.gnu.org/software/make/manual/html_node/Appending.html , it can > > be fixed by making CFLAGS a simply-expanded variable at its first > > assignment. > > > > I have submitted a patch. > > Thanks for the explanation. > I haven't yet seen your patch, but I agree that right thing to do is > do the 1st assignment as QEMU_CFLAGS := foo > > We can't really use CFLAGS, because CFLAGS need to work from the command > line > > make CFLAGS="-O0 -g" > > or I am lossing something obvious? In order to use the variable from the command line, we should use the syntax "override" before each CFLAGS modification. This way, it is possible to append options after the user ones. If override is not used, "make" expand the variable by using the command line value in priority, which overwrites the Makefile value. I could send another patch for that but it seems that my mails are filtered out by the mailing list. -- Thomas