From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXqJI-0005OE-ND for qemu-devel@nongnu.org; Wed, 09 Apr 2014 07:04:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXqJH-0000zH-5q for qemu-devel@nongnu.org; Wed, 09 Apr 2014 07:04:52 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:47578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXqJG-0000zB-V6 for qemu-devel@nongnu.org; Wed, 09 Apr 2014 07:04:51 -0400 From: Peter Maydell Date: Wed, 9 Apr 2014 12:04:47 +0100 Message-Id: <1397041487-28477-1-git-send-email-peter.maydell@linaro.org> Subject: [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: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Steven Noonan , patches@linaro.org 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 --- 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 -- 1.8.5.4