Skip to content

Instantly share code, notes, and snippets.

@xeioex
Created January 27, 2026 01:50
Show Gist options
  • Select an option

  • Save xeioex/6f425b998efd697c951c3dbe40771bb5 to your computer and use it in GitHub Desktop.

Select an option

Save xeioex/6f425b998efd697c951c3dbe40771bb5 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment