configure.ac: Disable compiler optimizations when --enable-debug is set
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 12 Dec 2012 14:59:36 +0000 (14:59 +0000)
committerChad Versace <chad.versace@linux.intel.com>
Wed, 12 Dec 2012 20:48:06 +0000 (14:48 -0600)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
configure.ac

index a133902c69fe327c5a46c0e037878e63fe4b5d9b..1294740a482a86bb45fa3b510591f9e2b65b4f65 100644 (file)
@@ -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"
+        CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -g -O0"
     fi
     if test "x$GXX_FOR_BUILD" = xyes; then
-        CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -g"
+        CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -g -O0"
     fi
 
     DEFINES="$DEFINES -DDEBUG"
     if test "x$GCC" = xyes; then
-        CFLAGS="$CFLAGS -g"
+        CFLAGS="$CFLAGS -g -O0"
     fi
     if test "x$GXX" = xyes; then
-        CXXFLAGS="$CXXFLAGS -g"
+        CXXFLAGS="$CXXFLAGS -g -O0"
     fi
 fi