diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2019-10-15 13:55:04 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2019-11-18 12:46:29 +0200 |
commit | f54bb77a6508b307a5b711730fa83d75bd80bcd4 (patch) | |
tree | 4876f6fbb7804aca2801c00f4188a4ffcd2ffdc6 | |
parent | a39867591170ba2c9e454267cf7cae00cdc06929 (diff) | |
download | rpm-f54bb77a6508b307a5b711730fa83d75bd80bcd4.tar.gz |
Add configure option to build with -Werror
-Werror is a bit tricky as it'll cause autoconf tests fail left and right
if it's just passed normally via CFLAGS, so we need to sneak it in
by some other means.
Note that while developers should always enable this, -Werror must never
ever be a default as it'll eventually just cause bogus build failures
when old releases get built with newer compilers.
(cherry picked from commit a84a33816ac4a791da184c81fbc40aa110c3c7ac)
-rw-r--r-- | configure.ac | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index cf6674c58..e40f71a44 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,8 @@ if test "$GCC" = yes; then done RPMCFLAGS="-D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes $RPMCFLAGS" fi +AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror], [build with -Werror])], + [RPMCFLAGS="$RPMCFLAGS -Werror"], []) AC_SUBST(RPMCFLAGS) AC_SYS_LARGEFILE |