From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0szu-0007HH-TM for qemu-devel@nongnu.org; Tue, 06 Sep 2011 06:35:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0szt-0007jD-Rx for qemu-devel@nongnu.org; Tue, 06 Sep 2011 06:35:18 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:61878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0szt-0007j8-KS for qemu-devel@nongnu.org; Tue, 06 Sep 2011 06:35:17 -0400 Received: by pzk37 with SMTP id 37so11635456pzk.29 for ; Tue, 06 Sep 2011 03:35:16 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110906080245.GA26732@rox.home.comstyle.com> References: <20110906080245.GA26732@rox.home.comstyle.com> Date: Tue, 6 Sep 2011 11:35:16 +0100 Message-ID: From: Peter Maydell 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. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brad Cc: qemu-devel@nongnu.org On 6 September 2011 09:02, Brad wrote: > @@ -937,6 +940,7 @@ echo " =C2=A0--cross-prefix=3DPREFIX =C2=A0 =C2=A0use= PREFIX for compile tools [$cross_prefix]" > =C2=A0echo " =C2=A0--cc=3DCC =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0use C compiler CC [$cc]" > =C2=A0echo " =C2=A0--host-cc=3DCC =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 use C compiler CC [$host_cc] for code run at" > =C2=A0echo " =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 build time" > +echo " =C2=A0--optflags=3DFLAGS =C2=A0 =C2=A0 =C2=A0 =C2=A0 override opt= imization compiler flags" > =C2=A0echo " =C2=A0--extra-cflags=3DCFLAGS =C2=A0 =C2=A0append extra C co= mpiler flags QEMU_CFLAGS" > =C2=A0echo " =C2=A0--extra-ldflags=3DLDFLAGS =C2=A0append extra linker fl= ags LDFLAGS" > =C2=A0echo " =C2=A0--make=3DMAKE =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0use specified make [$make]" No in principle objection to the --optflags bit of the patch, but you should rearrange things so that the help message can include the default optflags, something like: --optflags=3DFLAGS specify compiler flags for optimization [-O2] (...which might also let you avoid the 'if test -n "$optflags" later.) -- PMM