Welcome! Log In Create A New Profile

Advanced

Re: Optimization flags

All files from this thread

File Name File Size   Posted by Date  
clang-vs-gcc.png 53.3 KB open | download Lanti 07/08/2016 Read message
July 08, 2016 09:20AM
Seems like --with-cc=clang flag is where I can define clang compiler. Is it
safe to use with --with-cc-opt='-std=c11 ...? I think clang uses C11 anyway.

2016-07-08 14:44 GMT+02:00 Lantos István <kerozin.joe@gmail.com>:

> The default --with-cc-opt flags for Nginx are these:
>
> *--with-cc-opt='-g -O2 -fstack-protector-strong -Wformat
>> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2'*
>>
>
> However I added more optimizations, which are against the standard:
>
> *--with-cc-opt='-g -Ofast -march=native -ffast-math
>> -fstack-protector-strong -Wformat -Werror=format-security
>> -Wp,-D_FORTIFY_SOURCE=2'*
>>
>
> So far I don't experience any bug, but I do have a higher benchmark:
> 380-450 req/s compared to the original 290-310 req/s with cached
> Node/Express app on my laptop.
>
> Is it safe to use -O3 or -Ofast flags with Nginx?
>
> Is it possible to build Nginx with clang? If so, should I symlink it to
> gcc (I use Docker, this way gcc executable is trashed) or is there a way to
> define the compiler with a flag?
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Optimization flags

Lanti July 08, 2016 08:46AM

Re: Optimization flags

Lanti July 08, 2016 09:20AM

Re: Optimization flags

Valentin V. Bartenev July 08, 2016 09:22AM

Re: Optimization flags

Lanti July 08, 2016 09:24AM

Re: Optimization flags Attachments

Lanti July 08, 2016 05:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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