All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Tristan Gingold <gingold@adacore.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] configure: allow user to override cflags.
Date: Mon, 07 Feb 2011 08:57:59 -0600	[thread overview]
Message-ID: <4D500877.2020503@codemonkey.ws> (raw)
In-Reply-To: <1297087545-1942-1-git-send-email-gingold@adacore.com>

On 02/07/2011 08:05 AM, Tristan Gingold wrote:
> In order to allow user to override cflags, predefined flags must be inserted
> before user cflags.
>
> Signed-off-by: Tristan Gingold<gingold@adacore.com>
>    

I think there's a very specific reason we do it this way but I cannot 
remember at the moment.

Regards,

Anthony Liguori

> ---
>   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
>
>    

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 14:05 [Qemu-devel] [PATCH] configure: allow user to override cflags Tristan Gingold
2011-02-07 14:57 ` Anthony Liguori [this message]
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=4D500877.2020503@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.