Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mm8rA-0006Bu-Dy for qemu-devel@nongnu.org; Fri, 11 Sep 2009 12:20:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mm8r5-00063E-No for qemu-devel@nongnu.org; Fri, 11 Sep 2009 12:20:15 -0400 Received: from [199.232.76.173] (port=53003 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mm8r5-000639-KF for qemu-devel@nongnu.org; Fri, 11 Sep 2009 12:20:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9641) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mm8r5-00018S-FH for qemu-devel@nongnu.org; Fri, 11 Sep 2009 12:20:11 -0400 From: Juan Quintela In-Reply-To: <200909111806.39520.thomas@monjalon.net> (Thomas Monjalon's message of "Fri, 11 Sep 2009 18:06:39 +0200") References: <200909092236.n89MaDVS020267@d01av01.pok.ibm.com> <200909111744.37066.thomas@monjalon.net> <200909111806.39520.thomas@monjalon.net> Date: Fri, 11 Sep 2009 18:17:27 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Thomas Monjalon Cc: Anthony Liguori , qemu-devel@nongnu.org Thomas Monjalon wrote: > 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. > qemu only uses CFLAGS twice in the build system (everything interesting goes in QEMU_CFLAGS) (this in configure) CFLAGS="-g $CFLAGS" if test "$debug" = "no" ; then CFLAGS="-O2 $CFLAGS" fi echo "CFLAGS=$CFLAGS" >> $config_host_mak and %.o: %.c $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) -c -o $@ $<," CC $(TARGET_DIR)$@") (optionrom still uses them) I think that no override is needed (we can use := for QEMU_CFLAGS) > I could send another patch for that but it seems that my mails are filtered > out by the mailing list. Can you sent it to me then, I will repost Later, Juan.