[Mesa-dev] [PATCH] Revert "configure.ac: Disable compiler optimizations when --enable-debug is set"

Marek Olšák maraeo at gmail.com
Tue Jan 8 08:38:21 PST 2013


This reverts commit 122345876479cf5cf553e38162ab105658614ab7.

Some distributions use --enable-debug for testing packages and the commit
results in terrible CPU performance. It can be embarrassing for us.

Those who do not want optimizations should set the CFLAGS and CXXFLAGS
environment variables. In my opinion, --enable-debug should only set -DDEBUG.
---
 configure.ac |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1414ce8..f8bb885 100644
--- a/configure.ac
+++ b/configure.ac
@@ -341,18 +341,18 @@ AC_ARG_ENABLE([debug],
 if test "x$enable_debug" = xyes; then
     DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -DDEBUG"
     if test "x$GCC_FOR_BUILD" = xyes; then
-        CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -g -O0"
+        CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -g"
     fi
     if test "x$GXX_FOR_BUILD" = xyes; then
-        CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -g -O0"
+        CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -g"
     fi
 
     DEFINES="$DEFINES -DDEBUG"
     if test "x$GCC" = xyes; then
-        CFLAGS="$CFLAGS -g -O0"
+        CFLAGS="$CFLAGS -g"
     fi
     if test "x$GXX" = xyes; then
-        CXXFLAGS="$CXXFLAGS -g -O0"
+        CXXFLAGS="$CXXFLAGS -g"
     fi
 fi
 
-- 
1.7.10.4



More information about the mesa-dev mailing list