view auto/cc/sunc @ 258:6ae1357b7b7c NGINX_0_4_14

nginx 0.4.14 *) Feature: the "proxy_pass_error_message" directive in IMAP/POP3 proxy. *) Feature: now configure detects system PCRE library on FreeBSD, Linux, and NetBSD. *) Bugfix: ngx_http_perl_module did not work with perl built with the threads support; bug appeared in 0.3.38. *) Bugfix: ngx_http_perl_module did not work if perl was called recursively. *) Bugfix: nginx ignored a host name in an request line. *) Bugfix: a worker process may got caught in an endless loop, if a FastCGI server sent too many data to the stderr. *) Bugfix: the $upstream_response_time variable may be negative if the system time was changed backward. *) Bugfix: the "Auth-Login-Attempt" parameter was not sent to IMAP/POP3 proxy authentication server when POP3 was used. *) Bugfix: a segmentation fault might occur if connect to IMAP/POP3 proxy authentication server failed.
author Igor Sysoev <http://sysoev.ru>
date Mon, 27 Nov 2006 00:00:00 +0300
parents ff906029dd40
children 3021f899881a
line wrap: on
line source


# Copyright (C) Igor Sysoev


# Sun C 5.7 Patch 117837-04 2005/05/11
# Sun C 5.8 2005/10/13

NGX_SUNC_VER=`$CC -V 2>&1 | grep 'Sun C' 2>&1 \
                          | sed -e 's/^.* Sun C \(.*\)/\1/'`

echo " + Sun C version: $NGX_SUNC_VER"

have=NGX_COMPILER value="\"Sun C $NGX_SUNC_VER\"" . auto/define


case "$NGX_MACHINE" in

    i86pc)
        ngx_feature="PAUSE hardware capability bug"
        ngx_feature_name=
        ngx_feature_run=bug
        ngx_feature_incs=
        ngx_feature_path=
        ngx_feature_libs=
        ngx_feature_test='__asm ("pause")'

        . auto/feature

        if [ $ngx_found = yes ]; then
            # disable [ PAUSE ] hwcap for Sun Studio 11
            CORE_LINK="$CORE_LINK -Msrc/os/unix/ngx_sunpro_x86.map"
        fi

        NGX_AUX=" src/os/unix/ngx_sunpro_x86.il"
    ;;

    sun4u | sun4v)
        # "-xarch=v9" enables the "casa" assembler instruction
        CFLAGS="$CFLAGS -xarch=v9"
        CORE_LINK="$CORE_LINK -xarch=v9"
        NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il"
    ;;

esac


# optimizations

CFLAGS="$CFLAGS -fast"


case $CPU in
    pentium)
        # optimize for Pentium and Athlon
        CPU_OPT="-xchip=pentium"
    ;;

    pentiumpro)
        # optimize for Pentium Pro, Pentium II
        CPU_OPT="-xchip=pentium_pro"
    ;;

    pentium3)
        # optimize for Pentium III
        CPU_OPT="-xchip=pentium3"
        #CPU_OPT="$CPU_OPT -xarch=sse"
        CPU_OPT="$CPU_OPT -xcache=16/32/4:256/32/4"
    ;;

    pentium4)
        # optimize for Pentium 4
        CPU_OPT="-xchip=pentium4"
        #CPU_OPT="$CPU_OPT -xarch=sse2"
        CPU_OPT="$CPU_OPT -xcache=8/64/4:256/128/8"
    ;;

    opteron)
        # optimize for Opteron
        CPU_OPT="-xchip=opteron"
        #CPU_OPT="$CPU_OPT -xarch=sse2"
        CPU_OPT="$CPU_OPT -xcache=64/64/2:1024/64/16"
    ;;

    amd64)
        # build 64-bit amd64 binary
        CPU_OPT="-xarch=amd64"
        CORE_LINK="$CORE_LINK -xarch=amd64"
        NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il"
    ;;

esac


CFLAGS="$CFLAGS $CPU_OPT"


if [ ".$PCRE_OPT" = "." ]; then
    PCRE_OPT="-fast $CPU_OPT"
fi

if [ ".$MD5_OPT" = "." ]; then
    MD5_OPT="-fast $CPU_OPT"
fi

if [ ".$ZLIB_OPT" = "." ]; then
    ZLIB_OPT="-fast $CPU_OPT"
fi


# stop on warning
CFLAGS="$CFLAGS -errwarn=%all"