[Pkg-gnupg-commit] [gnupg2] 12/20: build: Check -Wlogical-op flag availability with -Werror.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Fri Dec 1 01:51:49 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 3ecd1a41be7c880976987d13e88342c98f37e064
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Mon Nov 20 12:01:31 2017 +0900
build: Check -Wlogical-op flag availability with -Werror.
* configure.ac: Use -Werror.
--
Using clang, -Wlogical-op doesn't fail but generates warning.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
configure.ac | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 42c0698..3d3a136 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1612,12 +1612,20 @@ if test "$GCC" = yes; then
mycflags="$mycflags -Wdeclaration-after-statement"
fi
- AC_MSG_CHECKING([if gcc supports -Wlogical-op and -Wvla])
- CFLAGS="-Wlogical-op -Wvla"
+ AC_MSG_CHECKING([if gcc supports -Wlogical-op])
+ CFLAGS="-Wlogical-op -Werror"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no)
AC_MSG_RESULT($_gcc_wopt)
if test x"$_gcc_wopt" = xyes ; then
- mycflags="$mycflags -Wlogical-op -Wvla"
+ mycflags="$mycflags -Wlogical-op -Werror"
+ fi
+
+ AC_MSG_CHECKING([if gcc supports -Wvla])
+ CFLAGS="-Wvla"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no)
+ AC_MSG_RESULT($_gcc_wopt)
+ if test x"$_gcc_wopt" = xyes ; then
+ mycflags="$mycflags -Wvla"
fi
else
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list