master - configure: check more compile flags
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7943a13141a8379f7697ee9d8764e088a4f127c3 Commit: 7943a13141a8379f7697ee9d8764e088a4f127c3 Parent: d95751cb0b750ea698d665bd8ad8086fe9ee6945 Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Oct 25 01:00:10 2013 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Oct 25 01:00:10 2013 +0200
configure: check more compile flags
Check for clobbered (and put few others into same league)
--- acinclude.m4 | 1 - configure | 41 +++++++++++++++++++++++++++++++++++++++-- configure.in | 2 ++ make.tmpl.in | 12 ++++++++---- 4 files changed, 49 insertions(+), 7 deletions(-)
acinclude.m4 +0 -1
@@ -24,7 +24,6 @@ AC_DEFUN([AC_TRY_CCFLAG], AC_REQUIRE([AC_PROG_CC]) ac_save_CFLAGS=$CFLAGS CFLAGS=$1 - AC_MSG_RESULT([KOUKEJ $name]) AC_CACHE_CHECK([whether $CC accepts $1 flag], [ac_cv_flag_$2], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [AS_VAR_SET([ac_cv_flag_$2], [yes])],
configure +39 -2
59 lines not on this page · raw message
configure.in +2 -0
@@ -838,6 +838,8 @@ fi dnl -- Check if compiler supports -Wjump-misses-init AC_TRY_CCFLAG([-Wjump-misses-init], [HAVE_WJUMP], [], []) AC_SUBST(HAVE_WJUMP) +AC_TRY_CCFLAG([-Wclobbered], [HAVE_WCLOBBERED], [], []) +AC_SUBST(HAVE_WCLOBBERED) ################################################################################ dnl -- Override optimisation
make.tmpl.in +8 -4
@@ -135,16 +135,20 @@ INSTALL_SCRIPT = $(INSTALL) -p $(M_INSTALL_PROGRAM) WFLAGS += -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings \ -Wmissing-prototypes -Wmissing-declarations -Wnested-externs \ -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls \ - -Wpointer-arith -Wclobbered -Wempty-body -Wignored-qualifiers \ - -Wmissing-parameter-type -Wold-style-declaration -Woverride-init \ - -Wtype-limits -Wuninitialized -Wmissing-include-dirs -Wsync-nand \ - -Wfloat-equal -Wlogical-op -Wstrict-prototypes \ + -Wpointer-arith -Wuninitialized -Wmissing-include-dirs \ + -Wfloat-equal -Wstrict-prototypes \ -Wold-style-definition -Wmissing-format-attribute ifeq ("@HAVE_WJUMP@", "yes") WFLAGS += -Wjump-misses-init endif +ifeq ("@HAVE_WCLOBBERED@", "yes") +WFLAGS += -Wclobbered -Wempty-body -Wignored-qualifiers \ + -Wmissing-parameter-type -Wold-style-declaration -Woverride-init \ + -Wtype-limits -Wsync-nand -Wlogical-op +endif + #WFLAGS += -W -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers #WFLAGS += -Wsign-compare -Wunused-parameter -Wmissing-field-initializers #WFLAGS += -Wconversion -Wbad-function-cast -Wcast-qual -Waggregate-return -Wpacked