diff --git a/ChangeLog b/ChangeLog index cc7b4aa14c8a11bb4cead381bd360cbfbe35ad8d..1be07f2234a5a67d00d9bacf25aff3f9c92498b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Sep 21 15:06:00 EST 2007 Daniel P. Berrange + + * 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 * src/qemu_driver.c: Use libxml for parsing & checking URIs diff --git a/acinclude.m4 b/acinclude.m4 index 6543f056edb1ff480aedc0ff2063a67c4449ba0f..15bb7ff6c2a6c8a47bfee22a674c5f61d4592d10 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -19,21 +19,23 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ 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 @@ -48,7 +50,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ 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" diff --git a/configure.in b/configure.in index 4bb2eee3aafb1911ad592e771644c75488351649..5ba819f773e715e09114c2b742b5a13d338984db 100644 --- a/configure.in +++ b/configure.in @@ -107,16 +107,6 @@ if test x"$enable_debug" = x"yes"; then 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]))