Blob Blame History Raw
diff --git a/bin/named/Makefile.am b/bin/named/Makefile.am
index 7065a90..e2e485b 100644
--- a/bin/named/Makefile.am
+++ b/bin/named/Makefile.am
@@ -32,6 +32,7 @@ AM_CPPFLAGS +=				\
 endif HAVE_LIBXML2
 
 AM_CPPFLAGS +=						\
+	-fpie                                           \
 	-DNAMED_LOCALSTATEDIR=\"${localstatedir}\"	\
 	-DNAMED_SYSCONFDIR=\"${sysconfdir}\"
 
@@ -122,5 +123,7 @@ named_LDADD +=					\
 	$(LIBNGHTTP2_LIBS)
 endif HAVE_LIBNGHTTP2
 
+AM_LDFLAGS += -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack
+
 MAINTAINERCLEANFILES =				\
 	named.conf.rst