Received: from eggs.gnu.org ([140.186.70.92]:59802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1Fes-0000rR-DW for qemu-devel@nongnu.org; Wed, 07 Sep 2011 06:47:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1Fer-0000sL-Aj for qemu-devel@nongnu.org; Wed, 07 Sep 2011 06:47:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1Feq-0000sF-U6 for qemu-devel@nongnu.org; Wed, 07 Sep 2011 06:47:05 -0400 From: Juan Quintela In-Reply-To: <20110907025910.GA21819@rox.home.comstyle.com> (brad@comstyle.com's message of "Tue, 6 Sep 2011 22:59:16 -0400") References: <20110907025910.GA21819@rox.home.comstyle.com> Date: Wed, 07 Sep 2011 12:46:55 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH] Add options to disable build with debug symbols and override optimization flags. Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brad Cc: qemu-devel@nongnu.org Brad wrote: > Add --disable-debug-symbols to disable building with debug > symbols and --optflags to override the optimization flags > passed to the compiler. > # default flags for all hosts > QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS" > -CFLAGS="-g $CFLAGS" > QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS" > QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" > QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS" > QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS" > QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/fpu" > -LDFLAGS="-g $LDFLAGS" I can understand this part. > > # make source path absolute > source_path=`cd "$source_path"; pwd` > @@ -518,6 +518,8 @@ for opt do > ;; > --cc=*) > ;; > + --optflags=*) optflags="$optarg" > + ;; > --host-cc=*) host_cc="$optarg" > ;; > --make=*) make="$optarg" No, please. We already have --extra-cflags, --extra-ldflags, no need for another one. I haven't tested, but my understanding is that just using: --extra-cflags="-O0" to your configure line should fix the "-O2" issue, no? My understanding is that: gcc -O2 .... -O0 ..... is understood as -O0, no? Whatever you pass in --extra-cflags is put at the end of the command line (otherwise, it is a bug somewhere). > @@ -588,6 +590,10 @@ for opt do > ;; > --disable-debug-mon) debug_mon="no" > ;; > + --enable-debug-symbols) debug_symbols="yes" > + ;; > + --disable-debug-symbols) debug_symbols="no" > + ;; > --enable-debug) > # Enable debugging options that aren't excessively noisy > debug_tcg="yes Not really sure if we should add this under the --enable-debug option. But I can agree with this option. Later, Juan.