From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1Fmi-0002Qx-4a for qemu-devel@nongnu.org; Wed, 07 Sep 2011 06:55:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1Fmf-0002CM-EG for qemu-devel@nongnu.org; Wed, 07 Sep 2011 06:55:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1Fmf-0002Bj-6K for qemu-devel@nongnu.org; Wed, 07 Sep 2011 06:55:09 -0400 From: Juan Quintela In-Reply-To: <1315326651.9576.8.camel@Nokia-N900> (brad@comstyle.com's message of "Tue, 06 Sep 2011 12:30:51 -0400") References: <20110906080245.GA26732@rox.home.comstyle.com> <4E65F3A9.80905@redhat.com> <1315326651.9576.8.camel@Nokia-N900> Date: Wed, 07 Sep 2011 12:54:59 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Only build with -g CFLAGS/LDFLAGS if using --enable-debug and add --optflags. Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brad Cc: Gerd Hoffmann , qemu-devel@nongnu.org Brad wrote: > ----- Original message ----- >> On 09/06/11 10:02, Brad wrote: >> > Only build with -g CFLAGS/LDFLAGS if using --enable-debug. >> > Add --optflags to allow overriding the default optimization >> > level added to CFLAGS. >> >=20 >> > This is a first draft of coming up with a patch I could potentially >> > push upstream based on much cruder local patches to do something >> > similar. I'm trying to eliminate having to patch the configure >> > script. >>=20 >> You don't have to.=C2=A0 You can just run 'make CFLAGS=3D"$optflags"' t= o=20 >> override the defaults.=C2=A0 Nevertheless having optflags would be nice= as=20 >> you don't have to type this for each make run then. > > I do when its unconditionally on the commandline either way. If the confi= gure scipt didnt put it their if CFLAGS wasnt empty it wouldnt be an issue. $(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS)= $(CFLAGS) -c -o $@ $<," CC $(TARGET_DIR)$@") this is the rule called in rules.make. QEMU don't use CFLAGS internally^W^W^W^W, it is only used for -g -O2, so it should be enough to use make CFLAGS=3D"" or something like that. > >> I don't think we should mess with the -g flag.=C2=A0 It should stay ena= bled=20 >> by default, so you can easily get a useful stacktrace out of a core=20 >> without having to rebuild with debug info first. > > I dont care what the default is as long as I can disable it without patch= ing. What is the reason for that? I guess that compilation speed/memory, but just to be sure. Later, Juan.