qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Andreas Färber" <andreas.faerber@web.de>,
	"Patch Tracking" <patches@linaro.org>,
	"Steven Noonan" <steven@uplinklabs.net>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH for-2.0] configure: use do_cc when checking for -fstack-protector support
Date: Thu, 10 Apr 2014 20:51:40 +0300	[thread overview]
Message-ID: <20140410175140.GB28144@redhat.com> (raw)
In-Reply-To: <CAFEAcA9Hm4=ugVsw9nhPnoT5UHkFtAAok+0pqwHZ-KZTR2cSQw@mail.gmail.com>

On Thu, Apr 10, 2014 at 05:37:31PM +0100, Peter Maydell wrote:
> On 10 April 2014 17:31, Michael S. Tsirkin <mst@redhat.com> wrote:
> > On Wed, Apr 09, 2014 at 12:04:47PM +0100, Peter Maydell wrote:
> >> MacOSX clang silently swallows unrecognized -f options when doing a link
> >> with '-framework' also on the command line, so to detect support for
> >> the various -fstack-protector options we must do a plain .c to .o compile,
> >> not a complete compile-and-link.
> >>
> >> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> >
> > Hmm it worries me a bit that we aren't passing it to linker:
> > might break some builds in case compiler has a working
> > protector but linker doesn't.
> 
> Given we both compile and link (in configure) with the
> same $compiler binary, this seems vanishingly unlikely.


True - I really meant libtool but we don't test it ATM
so we can leave that for another day.

OK fair enough:

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>


> > configure: check -c each time we run compiler
> >
> > Some warnings/errors only surface if you run compiler
> > without a linker. Run both on each test.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >
> >
> > diff --git a/configure b/configure
> > index eb0e7bb..8adc72b 100755
> > --- a/configure
> > +++ b/configure
> > @@ -102,6 +102,7 @@ compile_object() {
> >  compile_prog() {
> >    local_cflags="$1"
> >    local_ldflags="$2"
> > +  do_cc $QEMU_CFLAGS -c $local_cflags -o $TMPO $TMPC
> >    do_cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags
> >  }
> >
> 
> That's a lot of extra compiles and configure isn't
> exactly a speed demon as it is...
> 
> thanks
> -- PMM

  reply	other threads:[~2014-04-10 17:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-09 11:04 [Qemu-devel] [PATCH for-2.0] configure: use do_cc when checking for -fstack-protector support Peter Maydell
2014-04-10 16:31 ` Michael S. Tsirkin
2014-04-10 16:37   ` Peter Maydell
2014-04-10 17:51     ` Michael S. Tsirkin [this message]
2014-04-10 22:31       ` Peter Maydell
2014-04-11 12:34 ` Alexey Kardashevskiy
2014-04-11 14:24   ` Alexey Kardashevskiy
2014-04-11 14:33     ` Alexey Kardashevskiy
2014-04-11 15:30       ` Peter Maydell

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=20140410175140.GB28144@redhat.com \
    --to=mst@redhat.com \
    --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).