mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 06:03:31 -06:00
c31a9bb5e3
*) Security: if nginx was built with the ngx_http_realip_module and the "satisfy_any on" directive was used, then access and authorization directives did not work. The ngx_http_realip_module was not built and is not built by default. *) Change: the "$time_gmt" variable name was changed to "$time_local". *) Change: the "proxy_header_buffer_size" and "fastcgi_header_buffer_size" directives was renamed to the "proxy_buffer_size" and "fastcgi_buffer_size" directives. *) Feature: the ngx_http_memcached_module. *) Feature: the "proxy_buffering" directive. *) Bugfix: the changes in accept mutex handling when the "rtsig" method was used; the bug had appeared in 0.3.0. *) Bugfix: if the client sent the "Transfer-Encoding: chunked" header line, then nginx returns the 411 error. *) Bugfix: if the "auth_basic" directive was inherited from the http level, then the realm in the "WWW-Authenticate" header line was without the "Basic realm" text. *) Bugfix: if the "combined" format was explicitly specified in the "access_log" directive, then the empty lines was written to the log; the bug had appeared in 0.3.8. *) Bugfix: nginx did not run on the sparc platform under any OS except Solaris. *) Bugfix: now it is not necessary to place space between the quoted string and closing bracket in the "if" directive.
168 lines
3.0 KiB
Plaintext
168 lines
3.0 KiB
Plaintext
|
|
# Copyright (C) Igor Sysoev
|
|
|
|
|
|
# gcc 2.7.2.3, 2.8.1, 2.95.4, egcs-1.1.2
|
|
# 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4.0, 3.4.2
|
|
# 4.0.0, 4.0.1, 4.1.0
|
|
|
|
|
|
NGX_GCC_VER=`$CC -v 2>&1 | grep 'gcc version' 2>&1 \
|
|
| sed -e 's/^.* version \(.*\)/\1/'`
|
|
|
|
echo " + gcc version: $NGX_GCC_VER"
|
|
|
|
have=NGX_COMPILER value="\"gcc $NGX_GCC_VER\"" . auto/define
|
|
|
|
|
|
# Solaris 7's /usr/ccs/bin/as does not support "-pipe"
|
|
|
|
CC_TEST_FLAGS="-pipe"
|
|
|
|
ngx_feature="gcc -pipe switch"
|
|
ngx_feature_name=
|
|
ngx_feature_run=no
|
|
ngx_feature_incs=
|
|
ngx_feature_libs=
|
|
ngx_feature_test=
|
|
. auto/feature
|
|
|
|
CC_TEST_FLAGS=
|
|
|
|
if [ $ngx_found = yes ]; then
|
|
PIPE="-pipe"
|
|
fi
|
|
|
|
|
|
case "$NGX_MACHINE" in
|
|
|
|
sun4u | sparc )
|
|
# "-mcpu=v9" enables the "casa" assembler instruction
|
|
CFLAGS="$CFLAGS -mcpu=v9"
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
# optimizations
|
|
|
|
#NGX_GCC_OPT="-O2"
|
|
#NGX_GCC_OPT="-Os"
|
|
NGX_GCC_OPT="-O"
|
|
|
|
CFLAGS="$CFLAGS $NGX_GCC_OPT"
|
|
|
|
#CFLAGS="$CFLAGS -fomit-frame-pointer"
|
|
|
|
case $CPU in
|
|
pentium)
|
|
# optimize for Pentium and Athlon
|
|
CPU_OPT="-march=pentium"
|
|
;;
|
|
|
|
pentiumpro | pentium3)
|
|
# optimize for Pentium Pro, Pentium II and Pentium III
|
|
CPU_OPT="-march=pentiumpro"
|
|
;;
|
|
|
|
pentium4)
|
|
# optimize for Pentium 4, gcc 3.x
|
|
CPU_OPT="-march=pentium4"
|
|
;;
|
|
|
|
athlon)
|
|
# optimize for Athlon, gcc 3.x
|
|
CPU_OPT="-march=athlon"
|
|
;;
|
|
|
|
opteron)
|
|
# optimize for Opteron, gcc 3.x
|
|
CPU_OPT="-march=opteron"
|
|
;;
|
|
|
|
sparc32)
|
|
# build 32-bit UltraSparc binary
|
|
CPU_OPT="-m32"
|
|
CORE_LINK="$CORE_LINK -m32"
|
|
CC_AUX_FLAGS="$CC_AUX_FLAGS -m32"
|
|
;;
|
|
|
|
sparc64)
|
|
# build 64-bit UltraSparc binary
|
|
CPU_OPT="-m64"
|
|
CORE_LINK="$CORE_LINK -m64"
|
|
CC_AUX_FLAGS="$CC_AUX_FLAGS -m64"
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
case "$NGX_GCC_VER" in
|
|
2.7*)
|
|
# batch build
|
|
CPU_OPT=
|
|
;;
|
|
esac
|
|
|
|
|
|
CFLAGS="$CFLAGS $PIPE $CPU_OPT"
|
|
|
|
if [ ".$PCRE_OPT" = "." ]; then
|
|
PCRE_OPT="-O2 -fomit-frame-pointer $PIPE $CPU_OPT"
|
|
else
|
|
PCRE_OPT="$PCRE_OPT $PIPE"
|
|
fi
|
|
|
|
if [ ".$MD5_OPT" = "." ]; then
|
|
MD5_OPT="-O2 -fomit-frame-pointer $PIPE $CPU_OPT"
|
|
else
|
|
MD5_OPT="$MD5_OPT $PIPE"
|
|
fi
|
|
|
|
if [ ".$ZLIB_OPT" = "." ]; then
|
|
ZLIB_OPT="-O2 -fomit-frame-pointer $PIPE $CPU_OPT"
|
|
else
|
|
ZLIB_OPT="$ZLIB_OPT $PIPE"
|
|
fi
|
|
|
|
|
|
# warnings
|
|
|
|
# -W requires at least -O
|
|
CFLAGS="$CFLAGS ${NGX_GCC_OPT:-O} -W"
|
|
|
|
CFLAGS="$CFLAGS -Wall -Wpointer-arith"
|
|
#CFLAGS="$CFLAGS -Wconversion"
|
|
#CFLAGS="$CFLAGS -Winline"
|
|
|
|
|
|
case "$NGX_GCC_VER" in
|
|
3.* | 4.* )
|
|
# we have a lot of the unused function arguments
|
|
CFLAGS="$CFLAGS -Wno-unused-parameter"
|
|
CFLAGS="$CFLAGS -Wno-unused-function"
|
|
CFLAGS="$CFLAGS -Wunused-variable"
|
|
CFLAGS="$CFLAGS -Wunused-value"
|
|
#CFLAGS="$CFLAGS -Wunreachable-code"
|
|
;;
|
|
|
|
*)
|
|
# we have a lot of the unused function arguments
|
|
CFLAGS="$CFLAGS -Wno-unused"
|
|
;;
|
|
esac
|
|
|
|
|
|
# stop on warning
|
|
CFLAGS="$CFLAGS -Werror"
|
|
|
|
# debug
|
|
CFLAGS="$CFLAGS -g"
|
|
|
|
# DragonFly's gcc3 generates DWARF
|
|
#CFLAGS="$CFLAGS -g -gstabs"
|
|
|
|
if [ ".$CPP" = "." ]; then
|
|
CPP="$CC -E"
|
|
fi
|