[pacman-dev] [PATCH] Fix --enable-warningflags

Allan McRae allan at archlinux.org
Sat Feb 9 20:56:43 EST 2013


We need to to set -Werror to ensure the compiler bail when a warning
flag is unavailable.

Signed-off-by: Allan McRae <allan at archlinux.org>
---
 m4/acinclude.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
index e601f0e..0f7ee8f 100644
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -114,7 +114,7 @@ AC_DEFUN([CFLAGS_ADD],
 [AS_VAR_PUSHDEF([my_cflags], [cflags_cv_warn_$1])dnl
 AC_CACHE_CHECK([whether compiler handles $1], [my_cflags], [
   save_CFLAGS="$CFLAGS"
-  CFLAGS="${CFLAGS} $1"
+  CFLAGS="${CFLAGS} -Werror $1"
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
                     [AS_VAR_SET([my_cflags], [yes])],
                     [AS_VAR_SET([my_cflags], [no])])
-- 
1.8.1.3



More information about the pacman-dev mailing list