From: Matt Turner Date: Fri, 7 Jul 2017 05:19:15 +0000 (-0700) Subject: configure: Test for -Wno-initializer-overrides X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c5d2e2d43f697d4d9d35542f3839fcacaf848885;p=mesa.git 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: Emil Velikov Reviewed-by: Eric Engestrom --- diff --git a/configure.ac b/configure.ac index 50876b08466..ac64a38d437 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/intel/Makefile.am b/src/intel/Makefile.am index 9946f6752d0..a34e3014497 100644 --- a/src/intel/Makefile.am +++ b/src/intel/Makefile.am @@ -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)