mirror of https://gitee.com/openkylin/libvirt.git
Test compiler flags for linking too
This commit is contained in:
parent
01422bd794
commit
6f44e36e15
|
@ -1,3 +1,10 @@
|
|||
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
|
||||
|
|
14
acinclude.m4
14
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"
|
||||
|
|
10
configure.in
10
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]))
|
||||
|
|
Loading…
Reference in New Issue