[Mesa-dev] [PATCH] configure.ac: set -O0 on --enable-debug
Eero Tamminen
eero.t.tamminen at intel.com
Mon Oct 16 09:40:21 UTC 2017
Hi,
On 16.10.2017 02:35, Jason Ekstrand wrote:
> 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.
I use a script for configuring Mesa with suitable options (as CFLAGS
isn't not the only thing one needs, there's PKG_CONFIG_PATH etc too).
That's much less typing.
> 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.
At least I wouldn't want to debug user complains about Mesa performance
if Mesa start suddenly defaulting to abysmal (CPU) perf.
- Eero
> 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
>
>
> _______________________________________________
> 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