chiark
/
gitweb
/
~ian
/
gnupg2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
6e11695
)
build: Enable gcc warnings to detect non-portable code.
author
Werner Koch
<wk@gnupg.org>
Mon, 2 Jan 2017 11:59:10 +0000
(12:59 +0100)
committer
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Tue, 3 Jan 2017 20:39:52 +0000
(20:39 +0000)
--
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit
c52930d11fcc52515fcc09a1085bf118411566a8
)
Gbp-Pq: Name 0016-build-Enable-gcc-warnings-to-detect-non-portable-cod.patch
configure.ac
patch
|
blob
|
history
diff --git
a/configure.ac
b/configure.ac
index 932c741efeaefa3746545e6767f0d15f37298150..237189cf9449c8e63bb4566c3afb271994e69693 100644
(file)
--- a/
configure.ac
+++ b/
configure.ac
@@
-1575,6
+1575,15
@@
if test "$GCC" = yes; then
if test x"$_gcc_wopt" = xyes ; then
mycflags="$mycflags -Wdeclaration-after-statement"
fi
+
+ AC_MSG_CHECKING([if gcc supports -Wlogical-op and -Wvla])
+ CFLAGS="-Wlogical-op -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 -Wlogical-op -Wvla"
+ fi
+
else
mycflags="$mycflags -Wall"
fi