diff --git a/src/cf/linux-checks.m4 b/src/cf/linux-checks.m4 index f0d2dafeb5..e5dcdcc1ed 100644 --- a/src/cf/linux-checks.m4 +++ b/src/cf/linux-checks.m4 @@ -16,7 +16,7 @@ if test "x$enable_debug_kernel" = "xno"; then fi AX_APPEND_COMPILE_FLAGS([-fno-strict-aliasing -fno-strength-reduce \ -fno-common -pipe], - [LINUX_GCC_KOPTS]) + [LINUX_GCC_KOPTS],[-Werror]) AC_SUBST(LINUX_GCC_KOPTS) dnl Setup the kernel build environment diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index d98a1fe2bd..2805ab604e 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -645,9 +645,9 @@ if test "x$GCC" = "xyes"; then CFLAGS_NOUNUSED="-Wno-unused" CFLAGS_NOOLDSTYLE="-Wno-old-style-definition" AX_APPEND_COMPILE_FLAGS([-Wno-implicit-fallthrough], - [CFLAGS_NOIMPLICIT_FALLTHROUGH]) + [CFLAGS_NOIMPLICIT_FALLTHROUGH], [-Werror]) AX_APPEND_COMPILE_FLAGS([-Wno-cast-function-type], - [CFLAGS_NOCAST_FUNCTION_TYPE]) + [CFLAGS_NOCAST_FUNCTION_TYPE], [-Werror]) AC_DEFINE(IGNORE_SOME_GCC_WARNINGS, 1, [define to disable some gcc warnings in warnings-as-errors mode]) else CFLAGS_NOSTRICT= @@ -673,7 +673,7 @@ fi dnl add additional checks if compilers support the flags AS_IF([test "x$enable_checking" != "xno"], - [AX_APPEND_COMPILE_FLAGS([-Wimplicit-fallthrough], [XCFLAGS]) + [AX_APPEND_COMPILE_FLAGS([-Wimplicit-fallthrough], [XCFLAGS], [-Werror]) ]) dnl horribly cheating, assuming double / is ok.