Revert "configure: Leverage gcc warn options to enable safe use of C99 features where possible."
This reverts commit 79daa510c7
.
I apparently hadn't done a clean build when testing this; it broke the
build for Tom, Ben, and myself. We like the idea; let's try a v2.
This commit is contained in:
parent
7983a3d2e0
commit
982723dfa2
17
configure.ac
17
configure.ac
|
@ -263,18 +263,6 @@ if test "x$GCC" = xyes; then
|
||||||
# gcc's builtin memcmp is slower than glibc's
|
# gcc's builtin memcmp is slower than glibc's
|
||||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
|
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
|
||||||
CFLAGS="$CFLAGS -fno-builtin-memcmp"
|
CFLAGS="$CFLAGS -fno-builtin-memcmp"
|
||||||
|
|
||||||
# Flags to help ensure that certain portions of the code -- and only those
|
|
||||||
# portions -- can be built with MSVC:
|
|
||||||
# - src/util, src/gallium/auxiliary, and src/gallium/drivers/llvmpipe needs
|
|
||||||
# to build with Windows SDK 7.0.7600, which bundles MSVC 2008
|
|
||||||
# - non-Linux/Posix OpenGL portions needs to build on MSVC 2013 (which
|
|
||||||
# supports most of C99)
|
|
||||||
# - the rest has no compiler compiler restrictions
|
|
||||||
MSVC2013_COMPAT_CFLAGS="-Werror=vla -Werror=pointer-arith"
|
|
||||||
MSVC2013_COMPAT_CXXFLAGS="-Werror=vla -Werror=pointer-arith"
|
|
||||||
MSVC2008_COMPAT_CFLAGS="$MSVC2013_COMPAT_CFLAGS -Werror=declaration-after-statement"
|
|
||||||
MSVC2008_COMPAT_CXXFLAGS="$MSVC2013_COMPAT_CXXFLAGS"
|
|
||||||
fi
|
fi
|
||||||
if test "x$GXX" = xyes; then
|
if test "x$GXX" = xyes; then
|
||||||
CXXFLAGS="$CXXFLAGS -Wall"
|
CXXFLAGS="$CXXFLAGS -Wall"
|
||||||
|
@ -300,11 +288,6 @@ if test "x$GXX" = xyes; then
|
||||||
CXXFLAGS="$CXXFLAGS -fno-builtin-memcmp"
|
CXXFLAGS="$CXXFLAGS -fno-builtin-memcmp"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST([MSVC2013_COMPAT_CFLAGS])
|
|
||||||
AC_SUBST([MSVC2013_COMPAT_CXXFLAGS])
|
|
||||||
AC_SUBST([MSVC2008_COMPAT_CFLAGS])
|
|
||||||
AC_SUBST([MSVC2008_COMPAT_CXXFLAGS])
|
|
||||||
|
|
||||||
dnl even if the compiler appears to support it, using visibility attributes isn't
|
dnl even if the compiler appears to support it, using visibility attributes isn't
|
||||||
dnl going to do anything useful currently on cygwin apart from emit lots of warnings
|
dnl going to do anything useful currently on cygwin apart from emit lots of warnings
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
|
|
@ -26,7 +26,6 @@ AM_CFLAGS = \
|
||||||
-I$(top_srcdir)/src/gbm/main \
|
-I$(top_srcdir)/src/gbm/main \
|
||||||
$(DEFINES) \
|
$(DEFINES) \
|
||||||
$(VISIBILITY_CFLAGS) \
|
$(VISIBILITY_CFLAGS) \
|
||||||
$(MSVC2013_COMPAT_CFLAGS) \
|
|
||||||
$(EGL_CFLAGS) \
|
$(EGL_CFLAGS) \
|
||||||
-D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \
|
-D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \
|
||||||
-D_EGL_DRIVER_SEARCH_DIR=\"$(libdir)/egl\" \
|
-D_EGL_DRIVER_SEARCH_DIR=\"$(libdir)/egl\" \
|
||||||
|
|
|
@ -12,12 +12,9 @@ noinst_LTLIBRARIES = libgallium.la
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = \
|
||||||
-I$(top_srcdir)/src/gallium/auxiliary/util \
|
-I$(top_srcdir)/src/gallium/auxiliary/util \
|
||||||
$(GALLIUM_CFLAGS) \
|
$(GALLIUM_CFLAGS) \
|
||||||
$(VISIBILITY_CFLAGS) \
|
$(VISIBILITY_CFLAGS)
|
||||||
$(MSVC2008_COMPAT_CXXFLAGS)
|
|
||||||
|
|
||||||
AM_CXXFLAGS = \
|
AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
|
||||||
$(VISIBILITY_CXXFLAGS) \
|
|
||||||
$(MSVC2008_COMPAT_CXXFLAGS)
|
|
||||||
|
|
||||||
libgallium_la_SOURCES = \
|
libgallium_la_SOURCES = \
|
||||||
$(C_SOURCES) \
|
$(C_SOURCES) \
|
||||||
|
|
|
@ -25,12 +25,10 @@ include $(top_srcdir)/src/gallium/Automake.inc
|
||||||
|
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = \
|
||||||
$(GALLIUM_DRIVER_CFLAGS) \
|
$(GALLIUM_DRIVER_CFLAGS) \
|
||||||
$(LLVM_CFLAGS) \
|
$(LLVM_CFLAGS)
|
||||||
$(MSVC2008_COMPAT_CFLAGS)
|
|
||||||
AM_CXXFLAGS= \
|
AM_CXXFLAGS= \
|
||||||
$(GALLIUM_DRIVER_CXXFLAGS) \
|
$(GALLIUM_DRIVER_CXXFLAGS) \
|
||||||
$(LLVM_CXXFLAGS) \
|
$(LLVM_CXXFLAGS)
|
||||||
$(MSVC2008_COMPAT_CXXFLAGS)
|
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libllvmpipe.la
|
noinst_LTLIBRARIES = libllvmpipe.la
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,7 @@ include $(top_srcdir)/src/gallium/Automake.inc
|
||||||
|
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = \
|
||||||
$(GALLIUM_CFLAGS) \
|
$(GALLIUM_CFLAGS) \
|
||||||
$(VISIBILITY_CFLAGS) \
|
$(VISIBILITY_CFLAGS)
|
||||||
$(MSVC2013_COMPAT_CFLAGS)
|
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/src/egl/main \
|
-I$(top_srcdir)/src/egl/main \
|
||||||
|
|
|
@ -31,8 +31,7 @@
|
||||||
include $(top_srcdir)/src/gallium/Automake.inc
|
include $(top_srcdir)/src/gallium/Automake.inc
|
||||||
|
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = \
|
||||||
$(GALLIUM_TARGET_CFLAGS) \
|
$(GALLIUM_TARGET_CFLAGS)
|
||||||
$(MSVC2013_COMPAT_CFLAGS)
|
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/src/gallium/state_trackers/egl \
|
-I$(top_srcdir)/src/gallium/state_trackers/egl \
|
||||||
|
|
|
@ -33,12 +33,8 @@ AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/src/gtest/include \
|
-I$(top_srcdir)/src/gtest/include \
|
||||||
-I$(top_builddir)/src/glsl/nir \
|
-I$(top_builddir)/src/glsl/nir \
|
||||||
$(DEFINES)
|
$(DEFINES)
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = $(VISIBILITY_CFLAGS)
|
||||||
$(VISIBILITY_CFLAGS) \
|
AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
|
||||||
$(MSVC2013_COMPAT_CFLAGS)
|
|
||||||
AM_CXXFLAGS = \
|
|
||||||
$(VISIBILITY_CXXFLAGS) \
|
|
||||||
$(MSVC2013_COMPAT_CXXFLAGS)
|
|
||||||
|
|
||||||
EXTRA_DIST = tests glcpp/tests README TODO glcpp/README \
|
EXTRA_DIST = tests glcpp/tests README TODO glcpp/README \
|
||||||
glsl_lexer.ll \
|
glsl_lexer.ll \
|
||||||
|
|
|
@ -30,7 +30,6 @@ libloader_la_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
$(VISIBILITY_CFLAGS) \
|
$(VISIBILITY_CFLAGS) \
|
||||||
$(MSVC2013_COMPAT_CFLAGS) \
|
|
||||||
$(LIBUDEV_CFLAGS)
|
$(LIBUDEV_CFLAGS)
|
||||||
|
|
||||||
libloader_la_SOURCES = $(LOADER_C_FILES)
|
libloader_la_SOURCES = $(LOADER_C_FILES)
|
||||||
|
|
|
@ -39,9 +39,7 @@ EXTRA_DIST = \
|
||||||
glapi/SConscript \
|
glapi/SConscript \
|
||||||
shared-glapi/SConscript
|
shared-glapi/SConscript
|
||||||
|
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = $(PTHREAD_CFLAGS)
|
||||||
$(PTHREAD_CFLAGS) \
|
|
||||||
$(MSVC2013_COMPAT_CFLAGS)
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
$(DEFINES) \
|
$(DEFINES) \
|
||||||
$(SELINUX_CFLAGS) \
|
$(SELINUX_CFLAGS) \
|
||||||
|
|
|
@ -136,14 +136,8 @@ noinst_LTLIBRARIES += libmesagallium.la
|
||||||
endif
|
endif
|
||||||
|
|
||||||
AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS)
|
AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS)
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CFLAGS)
|
||||||
$(LLVM_CFLAGS) \
|
AM_CXXFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CXXFLAGS)
|
||||||
$(VISIBILITY_CFLAGS) \
|
|
||||||
$(MSVC2013_COMPAT_CFLAGS)
|
|
||||||
AM_CXXFLAGS = \
|
|
||||||
$(LLVM_CFLAGS) \
|
|
||||||
$(VISIBILITY_CXXFLAGS) \
|
|
||||||
$(MSVC2013_COMPAT_CXXFLAGS)
|
|
||||||
|
|
||||||
ARCH_LIBS =
|
ARCH_LIBS =
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,7 @@ libmesautil_la_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/src/gallium/include \
|
-I$(top_srcdir)/src/gallium/include \
|
||||||
-I$(top_srcdir)/src/gallium/auxiliary \
|
-I$(top_srcdir)/src/gallium/auxiliary \
|
||||||
$(SHA1_CFLAGS) \
|
$(SHA1_CFLAGS) \
|
||||||
$(VISIBILITY_CFLAGS) \
|
$(VISIBILITY_CFLAGS)
|
||||||
$(MSVC2008_COMPAT_CFLAGS)
|
|
||||||
|
|
||||||
libmesautil_la_SOURCES = \
|
libmesautil_la_SOURCES = \
|
||||||
$(MESA_UTIL_FILES) \
|
$(MESA_UTIL_FILES) \
|
||||||
|
|
Loading…
Reference in New Issue