Enabling -Werror should be opt-in and done only in known
environments (e.g. a seldom-changing build configuration in
CI). Making -Werror the default for our build configuration causes
more pain for downstream projects than it's worth. It remains enabled
in the project CI (see previous commit).
Signed-off-by: Nathan Lynch <
nat...@linux.ibm.com>
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/
configure.ac b/
configure.ac
index 2872ce965801..d581f3184e45 100644
--- a/
configure.ac
+++ b/
configure.ac
@@ -98,14 +98,14 @@ AM_CONDITIONAL(WITH_SYSTEMD, [test "$with_systemd" = 1])
AC_SUBST(systemd_unit_dir)
AC_ARG_ENABLE([werror],
- AS_HELP_STRING([--disable-werror], [avoid treating compiler warnings as fatal errors]))
+ AS_HELP_STRING([--enable-werror], [treat compiler warnings as fatal errors]))
AC_DEFUN([LOCAL_CHECK_FLAGS],[
AC_REQUIRE([AX_CHECK_LINK_FLAG])
AC_REQUIRE([AX_APPEND_COMPILE_FLAGS])
AC_LANG_PUSH([C])
AX_APPEND_COMPILE_FLAGS([-Wall])
- AS_IF([test "x$enable_werror" != "xno"], [AX_APPEND_COMPILE_FLAGS([-Werror])])
+ AS_IF([test "x$enable_werror" == "xyes"], [AX_APPEND_COMPILE_FLAGS([-Werror])])
AX_APPEND_COMPILE_FLAGS([-D_FORTIFY_SOURCE=2 -fstack-protector-all])
AX_APPEND_COMPILE_FLAGS([-fwrapv -fPIE -Wstack-protector])
AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1])
--
2.39.0