nginx-0.0.2-2004-03-10-20:55:19 import

This commit is contained in:
Igor Sysoev 2004-03-10 17:55:19 +00:00
parent fc5a10aedc
commit 24b56c92bb
14 changed files with 87 additions and 34 deletions

67
auto/cc
View File

@ -6,10 +6,20 @@ case $CC in
# optimization
#CFLAGS="$CFLAGS -O2 -fomit-frame-pointer"
# optimize for Pentium Pro, Pentium II and Pentium III
#CFLAGS="$CFLAGS -march=pentiumpro"
# optimize for Pentium 4, gcc 3.x
#CFLAGS="$CFLAGS -march=pentium4"
case $CPU_OPT in
pentiumpro)
# optimize for Pentium Pro, Pentium II and Pentium III
LIB_OPT="-march=pentiumpro"
;;
pentium4)
# optimize for Pentium 4, gcc 3.x
LIB_OPT="-march=pentium4"
;;
esac
CFLAGS="$CFLAGS $LIB_OPT"
ZLIB_OPT="-O2 -fomit-frame-pointer $LIB_OPT"
# warnings
CFLAGS="$CFLAGS -O -W"
@ -47,10 +57,19 @@ case $CC in
# optimization
CFLAGS="$CFLAGS -O"
# optimize for Pentium Pro, Pentium II and Pentium III
CFLAGS="$CFLAGS -mcpu=pentiumpro -march=pentiumpro"
# optimize for Pentium 4, default
#CFLAGS="$CFLAGS -march=pentium4"
case $CPU_OPT in
pentiumpro)
# optimize for Pentium Pro, Pentium II and Pentium III
LIB_OUT="-mcpu=pentiumpro -march=pentiumpro"
;;
pentium4)
# optimize for Pentium 4, default
LIB_OPT="-march=pentium4"
;;
esac
CFLAGS="$CFLAGS $LIB_OUT"
# warnings
CFLAGS="$CFLAGS -w1"
@ -88,8 +107,19 @@ case $CC in
CFLAGS="$CFLAGS -Oy"
# disable stack checking calls
CFLAGS="$CFLAGS -Gs"
# optimize for Pentium Pro
CFLAGS="$CFLAGS -G6"
case $CPU_OPT in
pentiumpro)
# optimize for Pentium Pro, Pentium II and Pentium III
LIB_OUT="-G6"
;;
pentium4)
# optimize for Pentium 4
#LIB_OUT="-G7"
;;
esac
CFLAGS="$CFLAGS $LIB_OUT"
# warnings
CFLAGS="$CFLAGS -W3"
@ -153,11 +183,18 @@ case $CC in
CFLAGS="$CFLAGS -oe"
# disable stack checking calls
CFLAGS="$CFLAGS -s"
# optimize for Pentium Pro, register-based arguments
OWC_OPT="-6r"
# optimize for Pentium Pro, stack-based arguments
#OWC_OPT="-6s"
CFLAGS="$CFLAGS $OWC_OPT"
case $CPU_OPT in
pentiumpro)
# optimize for Pentium Pro, Pentium II and Pentium III
# register-based arguments passing conventions
LIB_OUT="-6r"
# stack-based arguments passing conventions
#LIB_OUT="-6s"
;;
esac
CFLAGS="$CFLAGS $LIB_OUT"
# warnings
#CFLAGS="$CFLAGS -w3"

View File

@ -31,11 +31,11 @@ case $PLATFORM in
cp auto/lib/md5/$makefile $MD5
echo " cd $MD5" >> $MAKEFILE
echo " \$(MAKE) -f $makefile OWC_OPT=$OWC_OPT" >> $MAKEFILE
echo " \$(MAKE) -f $makefile LIB_OPT=$LIB_OPT" >> $MAKEFILE
echo " cd ..\\..\\.." >> $MAKEFILE
;;
SunOS:*:i386)
SunOS:*:i86pc)
echo " cd $MD5 && \$(MAKE) x86-solaris" >> $MAKEFILE
;;

View File

@ -1,5 +1,5 @@
CFLAGS = -nologo -c -MT -O2 -Ob1 -Oi -Gs -D MD5_ASM -D L_ENDIAN
CFLAGS = -nologo -c -MT -O2 -Ob1 -Oi -Gs $(LIB_OPT) -D MD5_ASM -D L_ENDIAN
md5.lib:
cl $(CFLAGS) md5_dgst.c

View File

@ -1,12 +1,6 @@
CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s $(OWC_OPT)
CFLAGS = -c -zq -bt=nt -bm -ot -op -oi -oe -s $(LIB_OPT)
md5.lib:
wcl386 $(CFLAGS) -bm -dL_ENDIAN md5_dgst.c
wcl386 $(CFLAGS) -dL_ENDIAN md5_dgst.c
wlib -n md5.lib md5_dgst.obj
#md5.lib:
asm:
wcl386 $(CFLAGS) -bm -dMD5_ASM -dL_ENDIAN md5_dgst.c
wcl386 $(CFLAGS) asm\m-win32.asm
wlib -n md5.lib md5_dgst.obj m-win32.obj

View File

@ -32,13 +32,14 @@ case $PLATFORM in
cp auto/lib/pcre/patch.config $PCRE
cp auto/lib/pcre/$makefile $PCRE
echo " cd $PCRE" >> $MAKEFILE
echo " \$(MAKE) -f $makefile OWC_OPT=$OWC_OPT" >> $MAKEFILE
echo " \$(MAKE) -f $makefile LIB_OPT=$LIB_OPT" >> $MAKEFILE
echo " cd ..\\..\\.." >> $MAKEFILE
;;
*)
echo " cd $PCRE \\" >> $MAKEFILE
echo " && ./configure --disable-shared \\" >> $MAKEFILE
echo $ngx_n " && CFLAGS=\"-O2 $LIB_OPT\"" $ngx_c >> $MAKEFILE
echo " ./configure --disable-shared \\" >> $MAKEFILE
echo " && \$(MAKE)" >> $MAKEFILE
;;

View File

@ -1,5 +1,5 @@
CFLAGS = -O2 -Ob1 -Oi -Gs -MT
CFLAGS = -O2 -Ob1 -Oi -Gs -MT $(LIB_OPT)
PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10

View File

@ -1,5 +1,5 @@
CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(OWC_OPT)
CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(LIB_OPT)
PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10

View File

@ -31,12 +31,12 @@ case $PLATFORM in
cp auto/lib/zlib/$makefile $ZLIB
echo " cd $ZLIB" >> $MAKEFILE
echo " \$(MAKE) -f $makefile OWC_OPT=$OWC_OPT" >> $MAKEFILE
echo " \$(MAKE) -f $makefile LIB_OPT=$LIB_OPT" >> $MAKEFILE
echo " cd ..\\..\\.." >> $MAKEFILE
;;
*:i386)
*:i386 | *:i686)
echo " cd $ZLIB \\" >> $MAKEFILE
echo " && cp contrib/asm686/match.S . \\" >> $MAKEFILE
echo " && CFLAGS=\"-O3 -DASMV\" ./configure \\" >> $MAKEFILE

View File

@ -1,5 +1,5 @@
CFLAGS = -nologo -c -MT -O2 -Ob1 -Oi -Gs
CFLAGS = -nologo -c -MT -O2 -Ob1 -Oi -Gs $(LIB_OPT)
zlib.lib:
cl $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c

View File

@ -1,5 +1,5 @@
CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(OWC_OPT)
CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(LIB_OPT)
zlib.lib:
wcl386 $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c

View File

@ -4,6 +4,8 @@ help=no
CC=gcc
OBJS=objs
CPU_OPT=NO
TEST_BUILD_DEVPOLL=NO
TEST_BUILD_EPOLL=NO
TEST_BUILD_RTSIG=NO
@ -62,11 +64,13 @@ do
--without-http_proxy_module) HTTP_PROXY=NO ;;
--with-cc=*) CC="$value" ;;
--with-cpu=*) CPU_OPT="$value" ;;
--without-pcre) USE_PCRE=DISABLED ;;
--with-pcre=*) PCRE="$value" ;;
--with-md5=*) MD5="$value" ;;
--with-zlib=*) ZLIB="$value" ;;
--with-zlib-opt=*) ZLIB_OPT="$value" ;;
--test-build-devpoll) TEST_BUILD_DEVPOLL=YES ;;
--test-build-epoll) TEST_BUILD_EPOLL=YES ;;

View File

@ -3,6 +3,8 @@ CORE_INCS="$UNIX_INCS"
CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS"
CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS"
CFLAGS="$CFLAGS -pipe"
# __FreeBSD_version is the best way to determine whether
# some capability exists and is safe to use

View File

@ -4,6 +4,8 @@ CORE_DEPS="$UNIX_DEPS $LINUX_DEPS"
CORE_SRCS="$UNIX_SRCS $LINUX_SRCS"
EVENT_MODULES="$EVENT_MODULES"
CFLAGS="$CFLAGS -pipe"
CC_TEST_FLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"

View File

@ -12,6 +12,19 @@ MAKE_SL=YES
CC_TEST_FLAGS="-D_FILE_OFFSET_BITS=64"
case $PLATFORM in
SunOS:5.[89]:* | SunOS:5.10:*)
CFLAGS="$CFLAGS -pipe"
;;
*)
# Solaris 7's gcc does not support "-pipe"
;;
esac
ngx_inc="sys/devpoll.h"; . auto/inc