Commit c5d2e2d4 authored by Matt Turner's avatar Matt Turner

configure: Test for -Wno-initializer-overrides

Clang has "-Wno-initializer-overrides", while gcc has
"-Wno-override-init". Quiets a lot of warnings with clang.
Reviewed-by: 's avatarEmil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom's avatarEric Engestrom <eric.engestrom@imgtec.com>
parent e4b2b69e
......@@ -339,6 +339,10 @@ esac
AC_SUBST([VISIBILITY_CFLAGS])
AC_SUBST([VISIBILITY_CXXFLAGS])
AX_CHECK_COMPILE_FLAG([-Wno-override-init], [WNO_OVERRIDE_INIT="-Wno-override-init"]) # gcc
AX_CHECK_COMPILE_FLAG([-Wno-initializer-overrides], [WNO_OVERRIDE_INIT="-Wno-initializer-overrides"]) # clang
AC_SUBST([WNO_OVERRIDE_INIT])
dnl
dnl Optional flags, check for compiler support
dnl
......
......@@ -44,7 +44,7 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(VISIBILITY_CFLAGS) \
-Wno-override-init
$(WNO_OVERRIDE_INIT)
MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment