[pacman-dev] [PATCH] Fix --enable-warningflags
Allan McRae
allan at archlinux.org
Sun Feb 10 09:05:12 EST 2013
On 10/02/13 11:56, Allan McRae wrote:
> 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>
> ---
<andrewgregory> i remember now what the other problem i had with your
warning flags fix was
<andrewgregory> it causes some of gcc's flags to not be recognized
<allanbrokeit> really?
<allanbrokeit> hrm...
<andrewgregory> format-nonliteral format-security and strict-prototypes
are no longer detected
<andrewgregory> the first two require -Wformat and i'm not sure why
strict-prototypes is failing
<allanbrokeit> conftest.c:102:1: error: function declaration isn't a
prototype [-Werror=strict-prototypes]
<allanbrokeit> main ()
<allanbrokeit> ^
<allanbrokeit> cc1: all warnings being treated as errors
<andrewgregory> ah, hmmm
<allanbrokeit> well, this is crap
> 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])])
>
More information about the pacman-dev
mailing list