Skip to content

Commit 72e9306

Browse files
committed
bugfix: ensured the 'pcre_version' symbol is also preserved on Darwin platforms.
Follow-up commit to 5a97cce
1 parent b2c2c2a commit 72e9306

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

config

+15-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ ngx_feature_test='struct sigaction act;
452452

453453
if [ $PCRE != NO -a $PCRE != YES ]; then
454454
# force pcre_version symbol to be undefined when PCRE is statically linked
455-
456455
ngx_feature="force undefined symbols (--undefined)"
457456
ngx_feature_libs="-Wl,--undefined=printf"
458457
ngx_feature_name=
@@ -466,6 +465,21 @@ if [ $PCRE != NO -a $PCRE != YES ]; then
466465
if [ $ngx_found = yes ]; then
467466
CORE_LIBS="$CORE_LIBS -Wl,--undefined=pcre_version"
468467
fi
468+
469+
# for LLVM ld (Darwin)
470+
ngx_feature="force undefined symbols (-all_load -U)"
471+
ngx_feature_libs="-all_load -U printf"
472+
ngx_feature_name=
473+
ngx_feature_run=no
474+
ngx_feature_incs="#include <stdio.h>"
475+
ngx_feature_path=
476+
ngx_feature_test='printf("hello");'
477+
478+
. auto/feature
479+
480+
if [ $ngx_found = yes ]; then
481+
CORE_LIBS="$CORE_LIBS -all_load -U pcre_version"
482+
fi
469483
fi
470484

471485
#CFLAGS=$"$CFLAGS -DLUA_DEFAULT_PATH='\"/usr/local/openresty/lualib/?.lua\"'"

0 commit comments

Comments
 (0)