[Mesa-dev] [PATCH kmscube 1/5] configure.ac: wire -Wall -Wextra directly into the build
Eric Engestrom
eric.engestrom at imgtec.com
Tue Mar 14 12:59:03 UTC 2017
On Tuesday, 2017-03-14 12:10:48 +0000, Emil Velikov wrote:
> Both flags are widely available and the rest of MAYBE_WARN are of little
> interest. Since atm no flags were passed, we might as well not bother
> with anything but the former two.
>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
> This will prompt some warnings, but we can sort this at a later stage.
I already started tackling these, patches coming later today/tonight.
Series is:
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
> ---
> Makefile.am | 1 +
> configure.ac | 38 --------------------------------------
> 2 files changed, 1 insertion(+), 38 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 80de719..a6abf78 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -37,6 +37,7 @@ kmscube_LDADD = \
>
> kmscube_CFLAGS = \
> -O0 -g \
> + -Wall -Wextra \
> $(DRM_CFLAGS) \
> $(GBM_CFLAGS) \
> $(EGL_CFLAGS) \
> diff --git a/configure.ac b/configure.ac
> index 615488a..785cd76 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -44,43 +44,5 @@ PKG_CHECK_MODULES(GBM, gbm)
> PKG_CHECK_MODULES(EGL, egl)
> PKG_CHECK_MODULES(GLES2, glesv2)
>
> -dnl ===========================================================================
> -dnl check compiler flags
> -AC_DEFUN([LIBDRM_CC_TRY_FLAG], [
> - AC_MSG_CHECKING([whether $CC supports $1])
> -
> - libdrm_save_CFLAGS="$CFLAGS"
> - CFLAGS="$CFLAGS $1"
> -
> - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
> - [libdrm_cc_flag=yes],
> - [libdrm_cc_flag=no])
> - CFLAGS="$libdrm_save_CFLAGS"
> -
> - if test "x$libdrm_cc_flag" = "xyes"; then
> - ifelse([$2], , :, [$2])
> - else
> - ifelse([$3], , :, [$3])
> - fi
> - AC_MSG_RESULT([$libdrm_cc_flag])
> -])
> -
> -MAYBE_WARN="-Wall -Wextra -Wno-packed-bitfield-compat \
> --Wsign-compare -Werror-implicit-function-declaration \
> --Wpointer-arith -Wwrite-strings -Wstrict-prototypes \
> --Wnested-externs \
> --Wpacked -Wswitch-enum -Wmissing-format-attribute \
> --Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
> --Wdeclaration-after-statement -Wold-style-definition \
> --Wno-missing-field-initializers -Wno-unused-parameter \
> --Wno-attributes -Wno-long-long -Winline"
> -
> -AC_MSG_CHECKING([which warning flags were supported])
> -for W in $MAYBE_WARN; do
> - LIBDRM_CC_TRY_FLAG([$W], [WARN_CFLAGS="$WARN_CFLAGS $W"])
> -done
> -
> -AC_SUBST(WARN_CFLAGS)
> -
> AC_CONFIG_FILES([Makefile])
> AC_OUTPUT
> --
> 2.11.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list