From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYJ80-00080A-I9 for qemu-devel@nongnu.org; Thu, 10 Apr 2014 13:51:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYJ7s-0003Qf-WD for qemu-devel@nongnu.org; Thu, 10 Apr 2014 13:51:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYJ7s-0003PQ-N3 for qemu-devel@nongnu.org; Thu, 10 Apr 2014 13:51:00 -0400 Date: Thu, 10 Apr 2014 20:51:40 +0300 From: "Michael S. Tsirkin" Message-ID: <20140410175140.GB28144@redhat.com> References: <1397041487-28477-1-git-send-email-peter.maydell@linaro.org> <20140410163132.GA28144@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH for-2.0] configure: use do_cc when checking for -fstack-protector support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , Andreas =?iso-8859-1?Q?F=E4rber?= , Patch Tracking , Steven Noonan , QEMU Developers On Thu, Apr 10, 2014 at 05:37:31PM +0100, Peter Maydell wrote: > On 10 April 2014 17:31, Michael S. Tsirkin 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 > > > > 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 > > 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 > > > > > > 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