aboutsummaryrefslogtreecommitdiff
path: root/auto/cc/gcc
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-03-19 12:38:37 +0000
committerIgor Sysoev <igor@sysoev.ru>2005-03-19 12:38:37 +0000
commitc15717285d2157a603bb1b130b26d7baa549be7e (patch)
tree56dc8346b22bb2660eecd3bc086d263ac6d67326 /auto/cc/gcc
parente12fbfe82a176cd386cdcecfeabf43ac8fd870a4 (diff)
downloadnginx-release-0.1.25.tar.gz
nginx-release-0.1.25.zip
nginx-0.1.25-RELEASE importrelease-0.1.25
*) Bugfix: nginx did run on Linux parisc. *) Feature: nginx now does not start under FreeBSD if the sysctl kern.ipc.somaxconn value is too big. *) Bugfix: if a request was internally redirected by the ngx_http_index_module module to the ngx_http_proxy_module or ngx_http_fastcgi_module modules, then the index file was not closed after request completion. *) Feature: the "proxy_pass" can be used in location with regular expression. *) Feature: the ngx_http_rewrite_filter_module module supports the condition like "if ($HTTP_USER_AGENT ~ MSIE)". *) Bugfix: nginx started too slow if the large number of addresses and text values were used in the "geo" directive. *) Change: a variable name must be declared as "$name" in the "geo" directive. The previous variant without "$" is still supported, but will be removed soon. *) Feature: the "%{VARIABLE}v" logging parameter. *) Feature: the "set $name value" directive. *) Bugfix: gcc 4.0 compatibility. *) Feature: the --with-openssl-opt=OPTIONS autoconfiguration directive.
Diffstat (limited to 'auto/cc/gcc')
-rw-r--r--auto/cc/gcc35
1 files changed, 29 insertions, 6 deletions
diff --git a/auto/cc/gcc b/auto/cc/gcc
index c5b4e74ee..46b0aabb9 100644
--- a/auto/cc/gcc
+++ b/auto/cc/gcc
@@ -2,8 +2,15 @@
# Copyright (C) Igor Sysoev
-# gcc 2.7.2.3, 2.8.1, 2.95.4,
+# 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
+
+
+NGX_GCC_VER=`$CC -v 2>&1 | grep 'gcc version' 2>&1 \
+ | sed -e 's/^.* version \(.*\)/\1/'`
+
+echo " + gcc version: $NGX_GCC_VER"
# Solaris 7's /usr/ccs/bin/as does not support "-pipe"
@@ -24,7 +31,6 @@ if [ $ngx_found = yes ]; then
PIPE="-pipe"
fi
-
# optimizations
#NGX_GCC_OPT="-O2"
@@ -61,8 +67,12 @@ case $CPU in
esac
-# STUB for batch builds
-if [ $CC = gcc27 ]; then CPU_OPT=; fi
+case "$NGX_GCC_VER" in
+ 2.7*)
+ # batch build
+ CPU_OPT=
+ ;;
+esac
CFLAGS="$CFLAGS $PIPE $CPU_OPT"
@@ -95,8 +105,21 @@ CFLAGS="$CFLAGS -Wall -Wpointer-arith"
#CFLAGS="$CFLAGS -Wconversion"
#CFLAGS="$CFLAGS -Winline"
-# we have a lot of the unused function arguments
-CFLAGS="$CFLAGS -Wno-unused"
+
+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 -Wunreachable-code"
+ ;;
+
+ *)
+ # we have a lot of the unused function arguments
+ CFLAGS="$CFLAGS -Wno-unused"
+ ;;
+esac
+
# stop on warning
CFLAGS="$CFLAGS -Werror"