CFLAGS & configure

Mike Kolesnikov mozilla_bugs at mail.ru
Sat Feb 5 12:17:00 MSK 2005


Еще один косячок в сборке, на 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 более активно
оптимизирует типы.





More information about the nginx-ru mailing list