Skip to content

Commit 69780f6

Browse files
committed
bugfix: config: fallback to '--undefined' option for ld 2.25 and below.
1 parent d062170 commit 69780f6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

config

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,22 @@ if [ $USE_PCRE = YES -o $PCRE != NONE ] && [ $PCRE != NO -a $PCRE != YES ]; then
522522

523523
if [ $ngx_found = yes ]; then
524524
CORE_LIBS="-Wl,--require-defined=pcre_version $CORE_LIBS"
525+
526+
else
527+
# ld 2.25 and below (--required-defined was introduced in 2.26)
528+
ngx_feature="require defined symbols fallback (--undefined)"
529+
ngx_feature_name=
530+
ngx_feature_path=
531+
ngx_feature_libs="-Wl,--undefined=strerror"
532+
ngx_feature_run=no
533+
ngx_feature_incs="#include <stdio.h>"
534+
ngx_feature_test='printf("hello");'
535+
536+
. auto/feature
537+
538+
if [ $ngx_found = yes ]; then
539+
CORE_LIBS="-Wl,--undefined=pcre_version $CORE_LIBS"
540+
fi
525541
fi
526542
;;
527543
esac

0 commit comments

Comments
 (0)