mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
configure: check for sync-nand
Check whether gcc support this flag. Some older compilers (gcc version 4.3.2) miss it.
This commit is contained in:
parent
47b704462e
commit
0982c5c79f
39
configure
vendored
39
configure
vendored
@ -749,6 +749,7 @@ CUNIT_CFLAGS
|
||||
GENPNG
|
||||
GENHTML
|
||||
LCOV
|
||||
HAVE_WSYNCNAND
|
||||
HAVE_WCLOBBERED
|
||||
HAVE_WJUMP
|
||||
SACKPT_LIBS
|
||||
@ -10214,6 +10215,44 @@ $as_echo "$ac_cv_flag_HAVE_WCLOBBERED" >&6; }
|
||||
|
||||
|
||||
|
||||
|
||||
ac_save_CFLAGS=$CFLAGS
|
||||
CFLAGS=-Wsync-nand
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Wsync-nand flag" >&5
|
||||
$as_echo_n "checking whether $CC accepts -Wsync-nand flag... " >&6; }
|
||||
if ${ac_cv_flag_HAVE_WSYNCNAND+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
ac_cv_flag_HAVE_WSYNCNAND=yes
|
||||
else
|
||||
ac_cv_flag_HAVE_WSYNCNAND=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flag_HAVE_WSYNCNAND" >&5
|
||||
$as_echo "$ac_cv_flag_HAVE_WSYNCNAND" >&6; }
|
||||
CFLAGS=$ac_save_CFLAGS
|
||||
HAVE_WSYNCNAND=$ac_cv_flag_HAVE_WSYNCNAND
|
||||
if test "HAVE_WSYNCNAND" = yes; then
|
||||
:
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C optimisation flag" >&5
|
||||
$as_echo_n "checking for C optimisation flag... " >&6; }
|
||||
|
@ -962,6 +962,8 @@ AC_TRY_CCFLAG([-Wjump-misses-init], [HAVE_WJUMP], [], [])
|
||||
AC_SUBST(HAVE_WJUMP)
|
||||
AC_TRY_CCFLAG([-Wclobbered], [HAVE_WCLOBBERED], [], [])
|
||||
AC_SUBST(HAVE_WCLOBBERED)
|
||||
AC_TRY_CCFLAG([-Wsync-nand], [HAVE_WSYNCNAND], [], [])
|
||||
AC_SUBST(HAVE_WSYNCNAND)
|
||||
|
||||
################################################################################
|
||||
dnl -- Override optimisation
|
||||
|
@ -156,7 +156,11 @@ 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
|
||||
-Wtype-limits -Wlogical-op
|
||||
endif
|
||||
|
||||
ifeq ("@HAVE_WSYNCNAND@", "yes")
|
||||
WFLAGS += -Wsync-nand
|
||||
endif
|
||||
|
||||
ifneq ("@STATIC_LINK@", "yes")
|
||||
|
Loading…
Reference in New Issue
Block a user