Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2013-02-10 11:55:04 +1000
committerAllan McRae <allan@archlinux.org>2013-02-13 11:50:33 +1000
commit05b0d7e799416b48bb8b40ea199896e2b988698c (patch)
treeca996c964aacb294bc34d50264acdd74bfdc74fd
parent42b492b2fd04ed33cfe95a0a3883d78e82ddec90 (diff)
Fix --enable-warningflags
gcc gives an error on an unknown warning flag, but clang just gives a warning. Upgrade the warning in clang to an error by activating -Werror=unknown-warning-option if available. Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--m4/acinclude.m44
1 files changed, 4 insertions, 0 deletions
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
index e601f0ed..294507e2 100644
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -114,6 +114,10 @@ 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} -Werror=unknown-warning-option"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+ [],
+ [CFLAGS="$save_CFLAGS"])
CFLAGS="${CFLAGS} $1"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AS_VAR_SET([my_cflags], [yes])],