From patchwork Wed Apr 9 11:04:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 28077 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AE6132145A for ; Wed, 9 Apr 2014 11:04:52 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id x10sf6530385pdj.6 for ; Wed, 09 Apr 2014 04:04:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=6XcpMuYxI2EZFPJd5CqYhWUKw/OFv2G+b1vgksesvmk=; b=GoGCajBNAUmfoQUk2w4Gc4hVa5+uNYM64g3AkXEdrZRyHgsE/D705i0Bg3We7MBSlD HKABaPqIM2DkmZD4JzHNz9ZzsVXaP3/pWUagjUr7rgaTC0dcTL8/R8E3dwV3Z6wrY5jA Y7lqwI73kXL9Bf7x7jrM1YXi2+WDkPiS8SvmewWE7hWXhmgGONrLT+juv6aYcVQ4eT/a sRh6aSd/t9lrtwb/4iLbrGpo8BYWUqG1oUs5MIZMP9nPbKL3A+sgOA9h4PSSv7abfsAV fhxOQzza/6lvHoJjcSs7Bj40n7X4Xo/V/S2190EMUgtN2y8YLQ6InqCcx+o9Slnr5vTs PzFQ== X-Gm-Message-State: ALoCoQlGJ+cRjTtUVEM5YH2Hu2K3yrID+dM7vqHS6lDGpMy0ZY6qdrfVdwcK+5SLTLVPyNAbsv0+ X-Received: by 10.68.201.134 with SMTP id ka6mr4604330pbc.4.1397041491707; Wed, 09 Apr 2014 04:04:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.183 with SMTP id 52ls611474qgv.38.gmail; Wed, 09 Apr 2014 04:04:51 -0700 (PDT) X-Received: by 10.220.12.66 with SMTP id w2mr8083229vcw.15.1397041491522; Wed, 09 Apr 2014 04:04:51 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id sh5si82376vdc.68.2014.04.09.04.04.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Apr 2014 04:04:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so1924288veb.34 for ; Wed, 09 Apr 2014 04:04:51 -0700 (PDT) X-Received: by 10.58.185.145 with SMTP id fc17mr8552068vec.14.1397041491404; Wed, 09 Apr 2014 04:04:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.12.8 with SMTP id v8csp319644vcv; Wed, 9 Apr 2014 04:04:51 -0700 (PDT) X-Received: by 10.180.75.202 with SMTP id e10mr36865014wiw.50.1397041490620; Wed, 09 Apr 2014 04:04:50 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id fd13si279520wjc.14.2014.04.09.04.04.50 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 09 Apr 2014 04:04:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WXqJD-0007Pm-Bm; Wed, 09 Apr 2014 12:04:47 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= , Steven Noonan , Paolo Bonzini Subject: [PATCH for-2.0] configure: use do_cc when checking for -fstack-protector support Date: Wed, 9 Apr 2014 12:04:47 +0100 Message-Id: <1397041487-28477-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Reviewed-by: Michael S. Tsirkin --- This should be a pretty safe change and it prevents clang/MacOSX builds from spewing a warning on every C file compilation, so I'd like to get it into 2.0. configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index eb0e7bb..c85475f 100755 --- a/configure +++ b/configure @@ -1448,7 +1448,7 @@ done if test "$stack_protector" != "no" ; then gcc_flags="-fstack-protector-strong -fstack-protector-all" for flag in $gcc_flags; do - if compile_prog "-Werror $flag" "" ; then + if do_cc $QEMU_CFLAGS -Werror $flag -c -o $TMPO $TMPC ; then QEMU_CFLAGS="$QEMU_CFLAGS $flag" LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,$flag" break