8a47aa
diff --git a/bin/named/Makefile.am b/bin/named/Makefile.am
66ddbb
index 57a023b..085f2f7 100644
8a47aa
--- a/bin/named/Makefile.am
8a47aa
+++ b/bin/named/Makefile.am
66ddbb
@@ -32,9 +32,12 @@ AM_CPPFLAGS +=				\
8a47aa
 endif HAVE_LIBXML2
Adam Tkac bbeea4
 
8a47aa
 AM_CPPFLAGS +=						\
8a47aa
+	-fpie                                           \
8a47aa
 	-DNAMED_LOCALSTATEDIR=\"${localstatedir}\"	\
8a47aa
 	-DNAMED_SYSCONFDIR=\"${sysconfdir}\"
Adam Tkac bbeea4
 
8a47aa
+AM_LDFLAGS += -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack
Adam Tkac bbeea4
+
66ddbb
 sbin_PROGRAMS = named
66ddbb
 
66ddbb
 nodist_named_SOURCES = xsl.c