qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Andreas Färber" <andreas.faerber@web.de>,
	"Steven Noonan" <steven@uplinklabs.net>,
	patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH for-2.0] configure: Make stack-protector test check both compile and link
Date: Sat, 12 Apr 2014 02:27:01 +1000	[thread overview]
Message-ID: <534817D5.3060904@ozlabs.ru> (raw)
In-Reply-To: <1397232832-32301-1-git-send-email-peter.maydell@linaro.org>

On 04/12/2014 02:13 AM, Peter Maydell wrote:
> Since we use the -fstack-protector argument at both compile and
> link time in the build, we must check that it works with both
> a compile and a link:
>  * MacOSX only fails in the compile step, not linking
>  * some gcc cross environments only fail at the link stage (if they
>    require a libssp and it's not present for some reason)
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


yay! thanks!

Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>


> ---
>  configure | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index c85475f..69b9f56 100755
> --- a/configure
> +++ b/configure
> @@ -1448,7 +1448,10 @@ done
>  if test "$stack_protector" != "no" ; then
>    gcc_flags="-fstack-protector-strong -fstack-protector-all"
>    for flag in $gcc_flags; do
> -    if do_cc $QEMU_CFLAGS -Werror $flag -c -o $TMPO $TMPC ; then
> +    # We need to check both a compile and a link, since some compiler
> +    # setups fail only on a .c->.o compile and some only at link time
> +    if do_cc $QEMU_CFLAGS -Werror $flag -c -o $TMPO $TMPC &&
> +       compile_prog "-Werror $flag" ""; then
>        QEMU_CFLAGS="$QEMU_CFLAGS $flag"
>        LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,$flag"
>        break
> 


-- 
Alexey

      reply	other threads:[~2014-04-11 16:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-11 16:13 [Qemu-devel] [PATCH for-2.0] configure: Make stack-protector test check both compile and link Peter Maydell
2014-04-11 16:27 ` Alexey Kardashevskiy [this message]

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=534817D5.3060904@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=andreas.faerber@web.de \
    --cc=patches@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=steven@uplinklabs.net \
    /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).