[Mesa-dev] [PATCH] mesa: Set -Werror=declaration-after-statement in mesa/Makefile
Chad Versace
chad.versace at intel.com
Fri Jan 28 11:53:25 PST 2011
MSVC does not support C99. To prevent GCC users from breaking the MSVC
build, explicit errors must be set.
---
src/mesa/Makefile | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 25e7cce..bb4d04d 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -21,8 +21,12 @@ MESA_CPPFLAGS := $(API_DEFINES) $(DEFINES)
# append include dirs
MESA_CPPFLAGS += $(INCLUDE_DIRS) $(TALLOC_CFLAGS)
+# MSVC does not support C99. To prevent GCC users from breaking the MSVC
+# build, explicit errors must be set.
+C_ERROR_FLAGS := -Werror=declaration-after-statement
+
# tidy compiler flags
-CFLAGS := $(filter-out $(DEFINES), $(CFLAGS))
+CFLAGS := $(filter-out $(DEFINES), $(CFLAGS)) $(C_ERROR_FLAGS)
CXXFLAGS := $(filter-out $(DEFINES), $(CXXFLAGS))
# LLVM is needed for the state tracker
--
1.7.3.5
More information about the mesa-dev
mailing list