From patchwork Wed Feb 8 12:54:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 140141 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C0E71B71C2 for ; Wed, 8 Feb 2012 23:54:29 +1100 (EST) Received: from localhost ([::1]:47288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rv72Y-0004KX-HT for incoming@patchwork.ozlabs.org; Wed, 08 Feb 2012 07:54:26 -0500 Received: from eggs.gnu.org ([140.186.70.92]:33180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rv72Q-0004KH-3A for qemu-devel@nongnu.org; Wed, 08 Feb 2012 07:54:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rv72O-0007ui-RE for qemu-devel@nongnu.org; Wed, 08 Feb 2012 07:54:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rv72O-0007ue-IN for qemu-devel@nongnu.org; Wed, 08 Feb 2012 07:54:16 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q18CsF4U007571 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 8 Feb 2012 07:54:15 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-33.ams2.redhat.com [10.36.116.33]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q18CsDjO026786; Wed, 8 Feb 2012 07:54:14 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 244FA41313; Wed, 8 Feb 2012 13:54:13 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 8 Feb 2012 13:54:13 +0100 Message-Id: <1328705653-24727-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH] build: allow turning off debuginfo X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This patch adds --{enable,disable}-debug-info switches to configure which allows to include/exclude the '-g' switch on the gcc & ld command lines. Not building debug info reduces ressource usage (especially disk) alot and is quite useful for test builds. Signed-off-by: Gerd Hoffmann --- configure | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 763db24..8e46600 100755 --- a/configure +++ b/configure @@ -98,6 +98,7 @@ audio_pt_int="" audio_win_int="" cc_i386=i386-pc-linux-gnu-gcc libs_qga="" +debug_info="yes" target_list="" @@ -207,6 +208,10 @@ for opt do ;; --extra-ldflags=*) LDFLAGS="$optarg $LDFLAGS" ;; + --enable-debug-info) debug_info="yes" + ;; + --disable-debug-info) debug_info="no" + ;; --sparc_cpu=*) sparc_cpu="$optarg" case $sparc_cpu in @@ -244,13 +249,15 @@ sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}" # 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" +if test "$debug_info" = "yes"; then + CFLAGS="-g $CFLAGS" + LDFLAGS="-g $LDFLAGS" +fi # make source path absolute source_path=`cd "$source_path"; pwd` @@ -545,6 +552,10 @@ for opt do ;; --extra-ldflags=*) ;; + --enable-debug-info) + ;; + --disable-debug-info) + ;; --cpu=*) ;; --target-list=*) target_list="$optarg"