From: Dmitry Volyntsev Date: Tue, 27 Jan 2026 02:19:05 +0000 (-0800) Subject: Fixed build on MacOS after 220b9b03 (0.9.5). X-Git-Tag: 0.9.6~28 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=cce5a162381c5d38fe3f8382b1acc8434ec08984;p=njs.git Fixed build on MacOS after 220b9b03 (0.9.5). MacOS linker does not support -Wl,-E as it exports binary symbols by default. This fixes #1015 on Github. --- diff --git a/auto/cc b/auto/cc index 5b21e17e..d2ce8f89 100644 --- a/auto/cc +++ b/auto/cc @@ -169,6 +169,20 @@ case $NJS_CC_NAME in esac +njs_feature="-Wl,-E" +njs_feature_name= +njs_feature_run=value +njs_feature_path= +njs_feature_incs= +njs_feature_libs=-Wl,-E +njs_feature_test="int main(void) { return 0; }" + +. auto/feature + +if [ $njs_found = yes ]; then + NJS_LINK="$NJS_LINK -Wl,-E" +fi + if [ "$NJS_DEBUG" = "YES" ]; then njs_define=NJS_DEBUG . auto/define fi diff --git a/auto/options b/auto/options index e99f9b97..1e563136 100644 --- a/auto/options +++ b/auto/options @@ -5,7 +5,7 @@ NJS_CC_OPT= NJS_LD_OPT= -NJS_LINK="-Wl,-E" +NJS_LINK= NJS_PIC=-fPIC NJS_DEBUG=NO