summaryrefslogtreecommitdiffstats
path: root/src/template/netbsd
diff options
context:
space:
mode:
Diffstat (limited to 'src/template/netbsd')
-rw-r--r--src/template/netbsd13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/template/netbsd b/src/template/netbsd
new file mode 100644
index 0000000..550e8f0
--- /dev/null
+++ b/src/template/netbsd
@@ -0,0 +1,13 @@
+# src/template/netbsd
+
+# Extra CFLAGS for code that will go into a shared library
+CFLAGS_SL="-fPIC -DPIC"
+
+# We must resolve all dynamic linking in the core server at program start.
+# Otherwise the postmaster can self-deadlock due to signals interrupting
+# resolution of calls, since NetBSD's linker takes a lock while doing that and
+# some postmaster signal handlers do things that will also acquire that lock.
+# As long as we need "-z now", might as well specify "-z relro" too.
+# While there's not a hard reason to adopt these settings for our other
+# executables, there's also little reason not to, so just add them to LDFLAGS.
+LDFLAGS="$LDFLAGS -Wl,-z,now -Wl,-z,relro"