CFLAGS & configure

Igor Sysoev is at rambler-co.ru
Sat Feb 5 13:40:33 MSK 2005


On Sat, 5 Feb 2005, Mike Kolesnikov wrote:

> Еще один косячок в сборке, на Fedora Core 3 (gcc 3.4.2):
>
> gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused -Werror -g -O2
> -march=k8 -fomit-frame-pointer -I src/core -I src/event -I src/event/modules
> -I src/os/unix -I ../pcre-4.5 -I objs -I src/http -I src/http/modules
> -I src/http/modules/proxy \
>        -o objs/src/http/modules/ngx_http_rewrite_handler.o \
>        src/http/modules/ngx_http_rewrite_handler.c
> src/http/modules/ngx_http_rewrite_handler.c: In function `ngx_http_rewrite':
> src/http/modules/ngx_http_rewrite_handler.c:827: warning: dereferencing
> type-punned pointer will break strict-aliasing rules
> src/http/modules/ngx_http_rewrite_handler.c:860: warning: dereferencing
> type-punned pointer will break strict-aliasing rules
> src/http/modules/ngx_http_rewrite_handler.c:910: warning: dereferencing
> type-punned pointer will break strict-aliasing rules
> src/http/modules/ngx_http_rewrite_handler.c:942: warning: dereferencing
> type-punned pointer will break strict-aliasing rules
> src/http/modules/ngx_http_rewrite_handler.c:954: warning: dereferencing
> type-punned pointer will break strict-aliasing rules
> make[1]: *** [objs/src/http/modules/ngx_http_rewrite_handler.o] Error 1
>
> Это я указал -O2 в --with-cc-opt, а он включает -fstrict-aliasing.
> Пришлось добавить -fno-strict-aliasing.
> Кстати, gcc 3.2.3 пропускает этот код - видать, 3.4 более активно
> оптимизирует типы.

0.1.18 будет собираться нормально. Это уже происходит на 3.3.


Игорь Сысоев
http://sysoev.ru





More information about the nginx-ru mailing list