qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/3] Add -Wold-style-* flags
Date: Wed, 30 Sep 2009 01:10:55 +0200	[thread overview]
Message-ID: <e36af02ee3ca0d2b2514e2668cb9ca1ccfe6b51a.1254265694.git.quintela@redhat.com> (raw)
In-Reply-To: <cover.1254265694.git.quintela@redhat.com>
In-Reply-To: <cover.1254265694.git.quintela@redhat.com>

This time, I add them in configure only if target compiler supports it

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 8b0db7e..81bcc27 100755
--- a/configure
+++ b/configure
@@ -1653,6 +1653,16 @@ QEMU_CFLAGS="-U_FORTIFY_SOURCE $QEMU_CFLAGS"
 QEMU_CFLAGS="-I. -I\$(SRC_PATH) -MMD -MP -MT \$@ $QEMU_CFLAGS"
 LDFLAGS="-g $LDFLAGS"

+gcc_flags="-Wold-style-declaration -Wold-style-definition"
+cat > $TMPC << EOF
+int main(void) { }
+EOF
+for flag in $gcc_flags; do
+    if compile_prog "$QEMU_CFLAGS" "$flag" ; then
+	QEMU_CFLAGS="$flag $QEMU_CFLAGS"
+    fi
+done
+
 # Consult white-list to determine whether to enable werror
 # by default.  Only enable by default for git builds
 if test -z "$werror" ; then
-- 
1.6.2.5

  parent reply	other threads:[~2009-09-29 23:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-29 23:10 [Qemu-devel] [PATCH 0/3] Build fixes Juan Quintela
2009-09-29 23:10 ` [Qemu-devel] [PATCH 1/3] slirp: It needs to use QEMU_CFLAGS not CFLAGS Juan Quintela
2009-09-29 23:10 ` Juan Quintela [this message]
2009-09-29 23:10 ` [Qemu-devel] [PATCH 3/3] bdf: Remove last users of FALSE/TRUE Juan Quintela

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=e36af02ee3ca0d2b2514e2668cb9ca1ccfe6b51a.1254265694.git.quintela@redhat.com \
    --to=quintela@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).