Welcome! Log In Create A New Profile

Advanced

Re: Bug in nginx 0.7.xx ./configure procedure

March 24, 2009 02:13AM
On Mon, Mar 23, 2009 at 09:56:45PM +0000, Mark Alan wrote:

> mike wrote:
> >What does this do?
> >
> ># ensure that there is only one -O in CFLAGS and that it is -O2
>
> When we use --with-cc-opt= to specify any alternative -On C compiler
> optimization, there seems to be a bug (or is it a designed feature?) in
> nginx's ./configure that leads to the following line in the created
> objs/Makefile file:
>
> CFLAGS = -O -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
> -Wno-unused-function -Wunused-variable -Wunused-value -Werror -g -O2
>
>
> If I am not wrong, that line should only have one instance of -O:
>
> CFLAGS = -pipe -W -Wall -Wpointer-arith -Wno-unused-parameter
> -Wno-unused-function -Wunused-variable -Wunused-value -Werror -g -O2
>
>
> Hence the usage of the command sed -i '/CFLAGS/s/ \-O //g' objs/Makefile
> to clean the other instances of -O.
>
> From man cc:
> " -O2 Optimize even more.
> (...)
> As compared to -O, this option increases both compilation time and the
> performance of the generated code."

As I understand gcc uses the lastest -O option, therefore -O -O2 is the same
as -O2. Also you may disable optimizations using -O -O0. As to -O2 itself,
I believe you would not see any significant changes in nginx with -O2
if compared with just -O. However, -O0 vs -O change is dramatically.


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

How to always have the latest nginx version in Ubuntu/Debian

Mark Alan March 23, 2009 05:02PM

Re: How to always have the latest nginx version in Ubuntu/Debian

mike March 23, 2009 05:31PM

Bug in nginx 0.7.xx ./configure procedure

Mark Alan March 23, 2009 06:16PM

Re: Bug in nginx 0.7.xx ./configure procedure

Igor Sysoev March 24, 2009 02:13AM

Re: Bug in nginx 0.7.xx ./configure procedure

Michael Shadle March 24, 2009 02:19AM

Re: Bug in nginx 0.7.xx ./configure procedure

Igor Sysoev March 24, 2009 02:34AM

Re: Bug in nginx 0.7.xx ./configure procedure

Mark Alan March 24, 2009 05:26AM

Re: Bug in nginx 0.7.xx ./configure procedure

Igor Sysoev March 24, 2009 07:24AM

Re: Bug in nginx 0.7.xx ./configure procedure

Mark Alan March 24, 2009 10:08AM

Re: How to always have the latest nginx version in Ubuntu/Debian

Merlin March 23, 2009 06:06PM

Re: How to always have the latest nginx version in Ubuntu/Debian

mike March 23, 2009 06:17PM

Re: How to always have the latest nginx version in Ubuntu/Debian

Mark Alan March 23, 2009 07:34PM

Re: How to always have the latest nginx version in Ubuntu/Debian

mike March 23, 2009 07:50PM

Re: How to always have the latest nginx version in Ubuntu/Debian

Igor Sysoev March 24, 2009 02:13AM

Re: How to always have the latest nginx version in Ubuntu/Debian

Michael Shadle March 24, 2009 02:23AM

Re: How to always have the latest nginx version in Ubuntu/Debian

Igor Sysoev March 24, 2009 02:27AM

Re: How to always have the latest nginx version in Ubuntu/Debian

Igor Sysoev March 24, 2009 02:34AM

Re: How to always have the latest nginx version in Ubuntu/Debian

Mark Alan March 23, 2009 07:34PM

Re: How to always have the latest nginx version in Ubuntu/Debian

Merlin March 23, 2009 08:46PM

Re: How to always have the latest nginx version in Ubuntu/Debian

Mark Alan March 24, 2009 06:12PM

Re: How to always have the latest nginx version in Ubuntu/Debian

Merlin March 24, 2009 09:23PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 183
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