mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-11 20:05:07 -05:00
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>
This commit is contained in:
parent
42b492b2fd
commit
05b0d7e799
@ -114,6 +114,10 @@ AC_DEFUN([CFLAGS_ADD],
|
|||||||
[AS_VAR_PUSHDEF([my_cflags], [cflags_cv_warn_$1])dnl
|
[AS_VAR_PUSHDEF([my_cflags], [cflags_cv_warn_$1])dnl
|
||||||
AC_CACHE_CHECK([whether compiler handles $1], [my_cflags], [
|
AC_CACHE_CHECK([whether compiler handles $1], [my_cflags], [
|
||||||
save_CFLAGS="$CFLAGS"
|
save_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="${CFLAGS} -Werror=unknown-warning-option"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||||
|
[],
|
||||||
|
[CFLAGS="$save_CFLAGS"])
|
||||||
CFLAGS="${CFLAGS} $1"
|
CFLAGS="${CFLAGS} $1"
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||||
[AS_VAR_SET([my_cflags], [yes])],
|
[AS_VAR_SET([my_cflags], [yes])],
|
||||||
|
Loading…
Reference in New Issue
Block a user