[Mesa-dev] [PATCH] configure.ac: set -O0 on --enable-debug
Miklós Máté
mtmkls at gmail.com
Sun Oct 15 17:46:04 UTC 2017
Autoconf sets CFLAGS="-g -O2" by default.
Signed-off-by: Miklós Máté <mtmkls at gmail.com>
---
configure.ac | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure.ac b/configure.ac
index 62d33a1941..c833d258ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -522,6 +522,8 @@ if test "x$enable_debug" = xyes; then
fi
if ! echo "$CFLAGS" | grep -q -e '-O'; then
CFLAGS="$CFLAGS -O0"
+ else
+ CFLAGS=`echo $CFLAGS | sed -e s/-O./-O0/`
fi
fi
if test "x$GXX" = xyes; then
@@ -530,6 +532,8 @@ if test "x$enable_debug" = xyes; then
fi
if ! echo "$CXXFLAGS" | grep -q -e '-O'; then
CXXFLAGS="$CXXFLAGS -O0"
+ else
+ CXXFLAGS=`echo $CXXFLAGS | sed -e s/-O./-O0/`
fi
fi
else
--
2.15.0.rc0
More information about the mesa-dev
mailing list