+Fri Sep 21 15:06:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
+
+ * acinclude.m4: Check all compiler flags link successfully
+ instead of just compiling, to deal with broken debian linker
+ with stack protector
+ * configure.in: Remove redundant -fno-stack-protector workaround
+
Fri Sep 21 15:06:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/qemu_driver.c: Use libxml for parsing & checking URIs
warnCFLAGS=
- try_compiler_flags="-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables"
+ common_flags="-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables"
case "$enable_compile_warnings" in
no)
+ try_compiler_flags=""
;;
minimum)
- try_compiler_flags="$try_compiler_flags -Wall"
+ try_compiler_flags="-Wall $common_flags"
;;
yes)
- try_compiler_flags="$try_compiler_flags -Wall -Wmissing-prototypes"
+ try_compiler_flags="-Wall -Wmissing-prototypes $common_flags"
;;
maximum|error)
- try_compiler_flags="$try_compiler_flags -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
- try_compiler_flags="$try_compiler_flags -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return"
+ try_compiler_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
+ try_compiler_flags="$try_compiler_flags -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return"
try_compiler_flags="$try_compiler_flags -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare"
+ try_compiler_flags="$try_compiler_flags $common_flags"
if test "$enable_compile_warnings" = "error" ; then
try_compiler_flags="$try_compiler_flags -Werror"
fi
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $option"
AC_MSG_CHECKING([whether gcc understands $option])
- AC_TRY_COMPILE([], [],
+ AC_TRY_LINK([], [],
has_option=yes,
has_option=no,)
CFLAGS="$SAVE_CFLAGS"
AC_DEFINE(ENABLE_DEBUG, [], [whether debugging is enabled])
fi
-dnl --disable-stack-protector
-AC_ARG_ENABLE(stack-protector,
- AC_HELP_STRING([--disable-stack-protector],
- [disable stack protector]),
- [],
- [enable_stack_protector=yes])
-if test x"$enable_stack_protector" = x"yes"; then
- CFLAGS="$CFLAGS -fstack-protector --param=ssp-buffer-size=4"
-fi
-
AC_MSG_CHECKING([where to write libvirtd PID file])
AC_ARG_WITH(remote-pid-file, AC_HELP_STRING([--with-remote-pid-file=[pidfile|none]], [PID file for libvirtd]))