summary refs log tree commit diff stats
path: root/configure
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-04-09 12:04:47 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-04-10 22:17:47 +0100
commit0a9077ea144a7e6a6f456b94e2d2eaad21e74d34 (patch)
tree907deb122daf7653d026876479315080dee7da49 /configure
parentefcc87d9aedb590b8506cd1a7c8abe557c760f9e (diff)
downloadfocaccia-qemu-0a9077ea144a7e6a6f456b94e2d2eaad21e74d34.tar.gz
focaccia-qemu-0a9077ea144a7e6a6f456b94e2d2eaad21e74d34.zip
configure: use do_cc when checking for -fstack-protector support
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>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 1397041487-28477-1-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure b/configure
index eb0e7bbce0..c85475fb87 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