qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Tristan Gingold <gingold@adacore.com>
To: qemu-devel@nongnu.org
Cc: Tristan Gingold <gingold@adacore.com>
Subject: [Qemu-devel] [PATCH] configure: allow user to override cflags.
Date: Mon,  7 Feb 2011 15:05:45 +0100	[thread overview]
Message-ID: <1297087545-1942-1-git-send-email-gingold@adacore.com> (raw)

In order to allow user to override cflags, predefined flags must be inserted
before user cflags.

Signed-off-by: Tristan Gingold <gingold@adacore.com>
---
 configure |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 598e8e1..f18ed0d 100755
--- a/configure
+++ b/configure
@@ -939,8 +939,10 @@ cat > $TMPC << EOF
 int main(void) { return 0; }
 EOF
 for flag in $gcc_flags; do
-    if compile_prog "-Werror $QEMU_CFLAGS" "-Werror $flag" ; then
-	QEMU_CFLAGS="$QEMU_CFLAGS $flag"
+    if compile_prog "-Werror $flag $QEMU_CFLAGS" "" ; then
+        # Note: flag must be prepended so that they could be overriden by
+        # user flags (such as -fno-stack-protector)
+	QEMU_CFLAGS="$flag $QEMU_CFLAGS"
     fi
 done
 
-- 
1.7.3.GIT

             reply	other threads:[~2011-02-07 14:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 14:05 Tristan Gingold [this message]
2011-02-07 14:57 ` [Qemu-devel] [PATCH] configure: allow user to override cflags Anthony Liguori
2011-02-07 15:08   ` Markus Armbruster
2011-02-07 15:13     ` Tristan Gingold

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=1297087545-1942-1-git-send-email-gingold@adacore.com \
    --to=gingold@adacore.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).