Skip to content

Commit d313bf8

Browse files
committed
bugfix: ensured the 'pcre_version' symbol is also preserved on Darwin platforms.
Follow-up commit to 2014dd8
1 parent c618d0d commit d313bf8

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

config

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,6 @@ fi
592592

593593
if [ $PCRE != NO -a $PCRE != YES ]; then
594594
# force pcre_version symbol to be undefined when PCRE is statically linked
595-
596595
ngx_feature="force undefined symbols (--undefined)"
597596
ngx_feature_libs="-Wl,--undefined=printf"
598597
ngx_feature_name=
@@ -606,6 +605,21 @@ if [ $PCRE != NO -a $PCRE != YES ]; then
606605
if [ $ngx_found = yes ]; then
607606
CORE_LIBS="$CORE_LIBS -Wl,--undefined=pcre_version"
608607
fi
608+
609+
# for LLVM ld (Darwin)
610+
ngx_feature="force undefined symbols (-all_load -U)"
611+
ngx_feature_libs="-all_load -U printf"
612+
ngx_feature_name=
613+
ngx_feature_run=no
614+
ngx_feature_incs="#include <stdio.h>"
615+
ngx_feature_path=
616+
ngx_feature_test='printf("hello");'
617+
618+
. auto/feature
619+
620+
if [ $ngx_found = yes ]; then
621+
CORE_LIBS="$CORE_LIBS -all_load -U pcre_version"
622+
fi
609623
fi
610624

611625
# ----------------------------------------

0 commit comments

Comments
 (0)