All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: John Snow <jsnow@redhat.com>, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH for-2.5] configure: Don't disable optimization for non-fortify builds
Date: Mon, 9 Nov 2015 16:28:24 +0100	[thread overview]
Message-ID: <5640BB98.8050001@redhat.com> (raw)
In-Reply-To: <1447082049-25099-1-git-send-email-peter.maydell@linaro.org>



On 09/11/2015 16:14, Peter Maydell wrote:
> Commit b553a0428014636bc inadvertently disabled optimization
> for all non-fortify builds. Fix this bug so we only do an
> unoptimized build if we want debug.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  configure | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/configure b/configure
> index b687764..46fd8bd 100755
> --- a/configure
> +++ b/configure
> @@ -4451,6 +4451,8 @@ if test "$gcov" = "yes" ; then
>    LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
>  elif test "$fortify_source" = "yes" ; then
>    CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
> +elif test "$debug" = "no"; then
> +  CFLAGS="-O2 $CFLAGS"
>  fi

I think what was intended is:

if test "$gcov" = "yes" ; then
  CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
  LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
elif test "$debug" = "no" ; then
  if test "$fortify_source" = "yes"; then
    CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
  fi
  CFLAGS="-O2 $CFLAGS"
fi

... so that --enable-debug does not disable _FORTIFY_SOURCE.

Paolo

>  ##########################################
> 

  reply	other threads:[~2015-11-09 15:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 15:14 [Qemu-devel] [PATCH for-2.5] configure: Don't disable optimization for non-fortify builds Peter Maydell
2015-11-09 15:28 ` Paolo Bonzini [this message]
2015-11-09 15:31   ` Peter Maydell
2015-11-09 15:33     ` Paolo Bonzini
2015-11-09 16:58       ` Peter Maydell
2015-11-12 15:30         ` Laurent Vivier
2015-11-09 22:14     ` Eric Blake
2015-11-09 16:38   ` John Snow

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=5640BB98.8050001@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --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.