aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-05-13 22:20:05 +0200
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-05-13 22:20:13 +0200
commit04c09553d89809cf6328679d7535ecaa0070485d (patch)
tree2b1232565f13b1265980fbe4167750ec955c68b8 /configure.ac
parenta9a6d946e41b459d3d04ab79df85ce0b31304948 (diff)
parenta30b0a24e97eae7f6d1428c5bf339a579872f28e (diff)
Merge #18887: build: enable -Werror=gnu
a30b0a24e97eae7f6d1428c5bf339a579872f28e build: enable -Werror=gnu (Vasil Dimov) Pull request description: Stop the build if a warning is emitted due to `-Wgnu` and `--enable-werror` has been used. As usual - this would help notice such a warning that is about to be introduced in new code. This is a followup to https://github.com/bitcoin/bitcoin/pull/18088 build: ensure we aren't using GNU extensions ACKs for top commit: practicalswift: ACK a30b0a24e97eae7f6d1428c5bf339a579872f28e Empact: ACK https://github.com/bitcoin/bitcoin/pull/18887/commits/a30b0a24e97eae7f6d1428c5bf339a579872f28e Tree-SHA512: f81b71cf3ee4db88b6f664c571075e0d30800a604f067f44273f256695a1dea533779db2ac859dd0a4cd8b66289c3e45f4aff1cfadfa160a1c354237167b05e2
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac1
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6f8f9d8ab2..dc7d34e55e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -360,6 +360,7 @@ if test "x$enable_werror" = "xyes"; then
if test "x$CXXFLAG_WERROR" = "x"; then
AC_MSG_ERROR("enable-werror set but -Werror is not usable")
fi
+ AX_CHECK_COMPILE_FLAG([-Werror=gnu],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=gnu"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Werror=vla],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=vla"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Werror=switch],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=switch"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Werror=thread-safety-analysis],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=thread-safety-analysis"],,[[$CXXFLAG_WERROR]])