Vladimir Shebordaev
July 30, 2012 06:34PM
2012/7/31 Maxim Dounin <mdounin@mdounin.ru>:
> Hello!
>
> On Mon, Jul 30, 2012 at 10:26:27PM +0400, Vladimir Shebordaev wrote:
>
>> Hi,
>>
>> I think it would be nice to disable optimitazions and enable full
>> debugging options when NGX_DEBUG is set
>
> These are quite orthogonal things. The --with-debug option
> enables debug logging. It's up to you to disable optimizations if
> you wan't to (--with-cc-opt="-O0") and/or enable additional
> debugging flags as understood by your compiler and debugger, but
> certainly not something should be done by default due to --with-debug.
>
>>
>> diff -Naur rev4754/auto/cc/gcc ticket55/auto/cc/gcc
>> --- rev4754/auto/cc/gcc 2012-07-16 23:15:16.733977245 +0400
>> +++ ticket55/auto/cc/gcc 2012-07-23 08:50:14.420222679 +0400
>> @@ -50,7 +50,12 @@
>>
>> #NGX_GCC_OPT="-O2"
>> #NGX_GCC_OPT="-Os"
>> +if [ "$NGX_DEBUG" = YES ]; then
>
> This is a wrong test for sure, as NGX_DEBUG is never empty, it's
> either NO or YES.
>

Sure, sorry, it is an excerpt from my working tree where I set the
flag on make command line. But when you enable debugging in the server
you might want to also run it under the debugger. It seems useful
anyways. At least for gcc.

>> +NGX_GCC_OPT="-ggdb3"
>> +else
>> NGX_GCC_OPT="-O"
>> +fi
>> +
>>
>> #CFLAGS="$CFLAGS -fomit-frame-pointer"
>
> Maxim Dounin
>

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

a minor build patch to facilitate debugging

Vladimir Shebordaev 1063 July 30, 2012 02:28PM

Re: a minor build patch to facilitate debugging

Maxim Dounin 474 July 30, 2012 06:18PM

Re: a minor build patch to facilitate debugging

Vladimir Shebordaev 597 July 30, 2012 06:34PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 160
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready