summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure b/configure
index c85475fb87..69b9f56847 100755
--- a/configure
+++ b/configure
@@ -1448,7 +1448,10 @@ done
if test "$stack_protector" != "no" ; then
gcc_flags="-fstack-protector-strong -fstack-protector-all"
for flag in $gcc_flags; do
- if do_cc $QEMU_CFLAGS -Werror $flag -c -o $TMPO $TMPC ; then
+ # We need to check both a compile and a link, since some compiler
+ # setups fail only on a .c->.o compile and some only at link time
+ if do_cc $QEMU_CFLAGS -Werror $flag -c -o $TMPO $TMPC &&
+ compile_prog "-Werror $flag" ""; then
QEMU_CFLAGS="$QEMU_CFLAGS $flag"
LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,$flag"
break