From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1Pin-0006lZ-Cx for qemu-devel@nongnu.org; Wed, 07 Sep 2011 17:31:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1Pim-0005LV-8o for qemu-devel@nongnu.org; Wed, 07 Sep 2011 17:31:49 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:54037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1Pij-0005L0-32 for qemu-devel@nongnu.org; Wed, 07 Sep 2011 17:31:48 -0400 Message-ID: <4E67E2BA.6070402@mail.berlios.de> Date: Wed, 07 Sep 2011 23:31:38 +0200 From: Stefan Weil MIME-Version: 1.0 References: <20110906080245.GA26732@rox.home.comstyle.com> <4E65F3A9.80905@redhat.com> <1315326651.9576.8.camel@Nokia-N900> In-Reply-To: <1315326651.9576.8.camel@Nokia-N900> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Only build with -g CFLAGS/LDFLAGS if using --enable-debug and add --optflags. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brad Cc: Gerd Hoffmann , qemu-devel@nongnu.org Am 06.09.2011 18:30, schrieb Brad: > ----- 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. >>> >>> 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. >> >> You don't have to. You can just run 'make CFLAGS="$optflags"' to >> override the defaults. Nevertheless having optflags would be nice as >> you don't have to type this for each make run then. > > I do when its unconditionally on the commandline either way. If the > configure scipt didnt put it their if CFLAGS wasnt empty it wouldnt be > an issue. > >> I don't think we should mess with the -g flag. It should stay enabled >> by default, so you can easily get a useful stacktrace out of a core >> without having to rebuild with debug info first. > > I dont care what the default is as long as I can disable it without > patching. I'm sorry but I still don't understand why you want this patch. It's already possible to run the compiler with or without -g and with any optimization you want: make CFLAGS="-O1", make CFLAGS=-g (my favourite), make CFLAGS="-O0", ... There must be a really good reason for new options like --optflags. Is this flag some kind of standard which is widely used (like CFLAGS)? If it isn't, users won't know it, so they won't use it, so it is useless. Regards, Stefan Weil