From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 5/8] configure: Avoid duplicate flags when calling compile_prog
Date: Fri, 9 Sep 2011 10:24:12 +0100 [thread overview]
Message-ID: <1315560255-25009-6-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1315560255-25009-1-git-send-email-stefanha@linux.vnet.ibm.com>
From: Stefan Weil <weil@mail.berlios.de>
This patch removes redundant shell code and cleans it a little bit.
Shell macro compile_prog takes two arguments:
local_cflags and local ldflags.
$QEMU_CFLAGS is added automatically to the cflags, so there is no need
to pass it as an argument.
It is also unnecessary to pass -Werror twice.
$flag is a compiler warning option, so it should be in local_cflags
instead of local_ldflags.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
configure | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index f808f48..348f36a 100755
--- a/configure
+++ b/configure
@@ -1070,7 +1070,7 @@ cat > $TMPC << EOF
int main(void) { return 0; }
EOF
for flag in $gcc_flags; do
- if compile_prog "-Werror $QEMU_CFLAGS" "-Werror $flag" ; then
+ if compile_prog "$flag -Werror" "" ; then
QEMU_CFLAGS="$QEMU_CFLAGS $flag"
fi
done
--
1.7.5.4
next prev parent reply other threads:[~2011-09-09 9:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-09 9:24 [Qemu-devel] [PULL 0/8] Trivial patches for September 3 to 9 2011 Stefan Hajnoczi
2011-09-09 9:24 ` [Qemu-devel] [PATCH 1/8] Fix comment (install patch -> install path) Stefan Hajnoczi
2011-09-09 9:24 ` [Qemu-devel] [PATCH 2/8] configure: Remove relicts from --enable-io-thread Stefan Hajnoczi
2011-09-09 9:24 ` [Qemu-devel] [PATCH 3/8] docs: Fix qdev-device-use.txt typo in -chardev serial, path=COM<NUM> Stefan Hajnoczi
2011-09-09 9:24 ` [Qemu-devel] [PATCH 4/8] qemu-options: Improve help texts for options which depend on configure Stefan Hajnoczi
2011-09-09 9:24 ` Stefan Hajnoczi [this message]
2011-09-09 9:24 ` [Qemu-devel] [PATCH 6/8] SPARC: Trivial patch to clean up npc monitor output Stefan Hajnoczi
2011-09-09 9:24 ` [Qemu-devel] [PATCH 7/8] virtio-9p: Fix syntax error in debug code Stefan Hajnoczi
2011-09-09 9:24 ` [Qemu-devel] [PATCH 8/8] Fix include statements for qemu-common.h Stefan Hajnoczi
2011-09-09 18:29 ` [Qemu-devel] [PULL 0/8] Trivial patches for September 3 to 9 2011 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=1315560255-25009-6-git-send-email-stefanha@linux.vnet.ibm.com \
--to=stefanha@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.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).