From: Matt Turner Date: Fri, 20 Feb 2015 20:41:46 +0000 (-0800) Subject: mesa: Have configure define NDEBUG, not mtypes.h. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b21ad12485d24565fd7f21addb5c86c77cf64580;p=mesa.git mesa: Have configure define NDEBUG, not mtypes.h. mtypes.h had been defining NDEBUG (used by assert) if DEBUG was not defined. Confusing and bizarre that you don't get NDEBUG if you don't include mtypes.h. ... which is just what happened in commit bef38f62e. Let's let configure define this for us if not using --enable-debug. Reviewed-by: Kenneth Graunke --- diff --git a/configure.ac b/configure.ac index beb7a7d1cfd..5fbb7bc31da 100644 --- a/configure.ac +++ b/configure.ac @@ -370,6 +370,8 @@ if test "x$enable_debug" = xyes; then CXXFLAGS="$CXXFLAGS -O0" fi fi +else + DEFINES="$DEFINES -DNDEBUG" fi dnl diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 05b5a8120e1..6e997730999 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -4512,9 +4512,6 @@ extern int MESA_DEBUG_FLAGS; # define MESA_VERBOSE 0 # define MESA_DEBUG_FLAGS 0 # define MESA_FUNCTION "a function" -# ifndef NDEBUG -# define NDEBUG -# endif #endif