Changeset 7246:04ebf29eaf5b in nginx


Ignore:
Timestamp:
03/22/18 12:55:57 (2 years ago)
Author:
Maxim Dounin <mdounin@…>
Branch:
default
Phase:
public
Message:

Configure: fixed static compilation with OpenSSL 1.1.1.

OpenSSL now uses pthread_atfork(), and this requires -lpthread on Linux
to compile. Introduced NGX_LIBPTHREAD to add it as appropriate, similar
to existing NGX_LIBDL.

Location:
auto
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • auto/lib/openssl/conf

    r6862 r7246  
    4242            CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"
    4343            CORE_LIBS="$CORE_LIBS $NGX_LIBDL"
     44            CORE_LIBS="$CORE_LIBS $NGX_LIBPTHREAD"
    4445
    4546            if [ "$NGX_PLATFORM" = win32 ]; then
     
    6061        ngx_feature_incs="#include <openssl/ssl.h>"
    6162        ngx_feature_path=
    62         ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL"
     63        ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL $NGX_LIBPTHREAD"
    6364        ngx_feature_test="SSL_CTX_set_options(NULL, 0)"
    6465        . auto/feature
     
    7273
    7374            if [ $NGX_RPATH = YES ]; then
    74                 ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lssl -lcrypto $NGX_LIBDL"
     75                ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lssl -lcrypto"
    7576            else
    76                 ngx_feature_libs="-L/usr/local/lib -lssl -lcrypto $NGX_LIBDL"
     77                ngx_feature_libs="-L/usr/local/lib -lssl -lcrypto"
    7778            fi
     79
     80            ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
    7881
    7982            . auto/feature
     
    8891
    8992            if [ $NGX_RPATH = YES ]; then
    90                 ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lssl -lcrypto $NGX_LIBDL"
     93                ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lssl -lcrypto"
    9194            else
    92                 ngx_feature_libs="-L/usr/pkg/lib -lssl -lcrypto $NGX_LIBDL"
     95                ngx_feature_libs="-L/usr/pkg/lib -lssl -lcrypto"
    9396            fi
     97
     98            ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
    9499
    95100            . auto/feature
     
    104109
    105110            if [ $NGX_RPATH = YES ]; then
    106                 ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lssl -lcrypto $NGX_LIBDL"
     111                ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lssl -lcrypto"
    107112            else
    108                 ngx_feature_libs="-L/opt/local/lib -lssl -lcrypto $NGX_LIBDL"
     113                ngx_feature_libs="-L/opt/local/lib -lssl -lcrypto"
    109114            fi
     115
     116            ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
    110117
    111118            . auto/feature
  • auto/threads

    r6018 r7246  
    1818    CORE_SRCS="$CORE_SRCS $THREAD_POOL_SRCS"
    1919    CORE_LIBS="$CORE_LIBS -lpthread"
     20    NGX_LIBPTHREAD="-lpthread"
    2021fi
  • auto/unix

    r7222 r7246  
    902902    if [ $ngx_found = yes ]; then
    903903        CORE_LIBS="$CORE_LIBS -lpthread"
     904        NGX_LIBPTHREAD="-lpthread"
    904905    fi
    905906fi
Note: See TracChangeset for help on using the changeset viewer.