From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgQz8-0005zr-1K for qemu-devel@nongnu.org; Wed, 26 Aug 2009 18:28:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgQz3-0005qi-Jq for qemu-devel@nongnu.org; Wed, 26 Aug 2009 18:28:53 -0400 Received: from [199.232.76.173] (port=45495 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgQz3-0005qH-6R for qemu-devel@nongnu.org; Wed, 26 Aug 2009 18:28:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20625) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MgQz2-00026l-LB for qemu-devel@nongnu.org; Wed, 26 Aug 2009 18:28:49 -0400 From: Juan Quintela In-Reply-To: (Hollis Blanchard's message of "Wed, 26 Aug 2009 15:15:36 -0700") References: Date: Thu, 27 Aug 2009 00:26:25 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH 70/81] remove last 3 uses of :=, everywhere else uses += or = List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hollis Blanchard Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org Hollis Blanchard wrote: > On Wed, Aug 26, 2009 at 2:46 PM, Juan Quintela wrote: >> Hollis Blanchard wrote: >>> On Mon, Aug 3, 2009 at 5:47 AM, Juan Quintela wrot= e: >> Could you check two things: >> >> a- remove the whole block, it should not be needed anymore (or that I >> =C2=A0 have been told) > > The original commit, from malc, says it's necessary to work around a > gcc 4.3.0 bug. If that's true, it's probably not a great idea to > remove it. >>From malc: -fno-unit-at-a-time (-fno-toplevel-reorder which -fno-unit-at-a-time implies actually) is no longer needed after BlueSwirls work on PPC's translate. it appears that they changed the file that was misscompiled (I don't have more information). I was waiting for someone with ppc access to test its removal (only ifeq remaining on Makefile.target that depends of architecture, all other are gone (but I was not able to test this one, hint, hint, :) >> b- if a) don't work, tryng to change the interior bit to >> >> translate.o: QEMU_CFLAGS +=3D $(call cc-option, $(CFLAGS),-fno-unit-at-a= -time,) >> >> And if so, we can do this change. =C2=A0What we pass as 2nd argument >> shouldn't matter for this test. >> >> call cc-option is complicated to get right, sorry :( > > If it doesn't matter, better not to pass anything, rather than confuse > the reader into thinking it does matter. This seems to work: > translate.o: QEMU_CFLAGS +=3D $(call cc-option, , -fno-unit-at-a-time,) > > But strangely, this doesn't: > translate.o: QEMU_CFLAGS +=3D $(call cc-option, "", -fno-unit-at-a-time,) I told you that call cc-option was bad :) Look at its definition: # cc-option # Usage: CFLAGS+=3D$(call cc-option, $(CFLAGS), -falign-functions=3D0, -mal= ign-functions=3D0) cc-option =3D $(shell if $(CC) $(1) $(2) -S -o /dev/null -xc /dev/null \ > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi ;) it appears that gcc don't like an empty argument in the middle :p Actually, I think that example and macro is just wrong. 2nd argument shouldn't exist at all. We are testing if compiler accept some option, shouldn't be needed any $CFLAGS at all. But I didn't want to change so many things. > However, what if the second argument did matter? I don't understand > the problem with the original syntax. There were (at least) 3 different styles on Makefiles, now there is only one. We had +=3D, :=3D and I think some other funny variants. Now we only have = +=3D Later, Juan.