[Mesa-dev] [PATCH] configure.ac: set -O0 on --enable-debug
Jason Ekstrand
jason at jlekstrand.net
Sun Oct 15 23:35:30 UTC 2017
I'm not sure what I think of this patch. On the one hand, I'm constantly
setting CFLAGS="-O0 -ggdb3" when I configure and it seems like a nicer
default. On the other hand, this is changing the default to something that
is different both from what mesa has done for a long time and from the
autotools default so it may have some unexpected effects.
On October 15, 2017 10:46:15 AM Miklós Máté <mtmkls at gmail.com> wrote:
> 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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list