From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH] build: allow turning off debuginfo
Date: Wed, 8 Feb 2012 13:54:13 +0100 [thread overview]
Message-ID: <1328705653-24727-1-git-send-email-kraxel@redhat.com> (raw)
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 <kraxel@redhat.com>
---
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"
--
1.7.1
next reply other threads:[~2012-02-08 12:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 12:54 Gerd Hoffmann [this message]
2012-02-24 10:39 ` [Qemu-devel] [PATCH] build: allow turning off debuginfo Gerd Hoffmann
2012-02-24 11:16 ` Peter Maydell
2012-02-24 17:52 ` Gerd Hoffmann
2012-02-24 19:46 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1328705653-24727-1-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).