File pie_compile.diff of Package bind.10346

Index: bin/check/Makefile.in
===================================================================
--- bin/check/Makefile.in.orig
+++ bin/check/Makefile.in
@@ -48,8 +48,12 @@ HTMLPAGES =	named-checkconf.html named-c
 
 MANOBJS =	${MANPAGES} ${HTMLPAGES}
 
+EXT_CFLAGS = -fPIE -static
+
 @BIND9_MAKE_RULES@
 
+LDFLAGS   += -pie
+
 named-checkconf.@O@: named-checkconf.c
 	${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
 		-DVERSION=\"${VERSION}\" \
Index: bin/confgen/Makefile.in
===================================================================
--- bin/confgen/Makefile.in.orig
+++ bin/confgen/Makefile.in
@@ -56,8 +56,12 @@ MANOBJS =	${MANPAGES} ${HTMLPAGES}
 
 UOBJS =		unix/os.@O@
 
+EXT_CFLAGS = -fPIE -static
+
 @BIND9_MAKE_RULES@
 
+LDFLAGS   += -pie
+
 rndc-confgen.@O@: rndc-confgen.c
 	${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
 		-DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\" \
Index: bin/confgen/unix/Makefile.in
===================================================================
--- bin/confgen/unix/Makefile.in.orig
+++ bin/confgen/unix/Makefile.in
@@ -24,4 +24,8 @@ SRCS =		os.c
 
 TARGETS =	${OBJS}
 
+EXT_CFLAGS = -fPIE -static
+
 @BIND9_MAKE_RULES@
+
+LDFLAGS   += -pie
Index: bin/dig/Makefile.in
===================================================================
--- bin/dig/Makefile.in.orig
+++ bin/dig/Makefile.in
@@ -61,8 +61,12 @@ MANOBJS =	${MANPAGES} ${HTMLPAGES}
 
 EXT_CFLAGS = -DWITH_LIBIDN
 
+EXT_CFLAGS = -fPIE -static
+
 @BIND9_MAKE_RULES@
 
+LDFLAGS   += -pie
+
 dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
 	export BASEOBJS="dig.@O@ dighost.@O@ ${UOBJS}"; \
 	export LIBS0="${DNSLIBS}"; \
Index: bin/dnssec/Makefile.in
===================================================================
--- bin/dnssec/Makefile.in.orig
+++ bin/dnssec/Makefile.in
@@ -56,8 +56,12 @@ HTMLPAGES =	dnssec-dsfromkey.html dnssec
 
 MANOBJS =	${MANPAGES} ${HTMLPAGES}
 
+EXT_CFLAGS = -fPIE -static
+
 @BIND9_MAKE_RULES@
 
+LDFLAGS   += -pie
+
 dnssec-dsfromkey@EXEEXT@: dnssec-dsfromkey.@O@ ${OBJS} ${DEPLIBS}
 	export BASEOBJS="dnssec-dsfromkey.@O@ ${OBJS}"; \
 	${FINALBUILDCMD}
Index: bin/Makefile.in
===================================================================
--- bin/Makefile.in.orig
+++ bin/Makefile.in
@@ -14,4 +14,8 @@ SUBDIRS =	named rndc dig delv dnssec too
 		check confgen @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@
 TARGETS =
 
+EXT_CFLAGS = -fPIE -static
+
 @BIND9_MAKE_RULES@
+
+LDFLAGS   += -pie
Index: bin/named/Makefile.in
===================================================================
--- bin/named/Makefile.in.orig
+++ bin/named/Makefile.in
@@ -108,8 +108,12 @@ HTMLPAGES =	named.html lwresd.html named
 
 MANOBJS =	${MANPAGES} ${HTMLPAGES}
 
+EXT_CFLAGS = -fPIE -static
+
 @BIND9_MAKE_RULES@
 
+LDFLAGS   += -pie
+
 main.@O@: main.c
 	${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
 		-DVERSION=\"${VERSION}\" \
Index: bin/named/unix/Makefile.in
===================================================================
--- bin/named/unix/Makefile.in.orig
+++ bin/named/unix/Makefile.in
@@ -25,4 +25,6 @@ SRCS =		os.c dlz_dlopen_driver.c
 
 TARGETS =	${OBJS}
 
+EXT_CFLAGS = -fPIE -static
+
 @BIND9_MAKE_RULES@
Index: bin/nsupdate/Makefile.in
===================================================================
--- bin/nsupdate/Makefile.in.orig
+++ bin/nsupdate/Makefile.in
@@ -60,8 +60,12 @@ HTMLPAGES =	nsupdate.html
 
 MANOBJS =	${MANPAGES} ${HTMLPAGES}
 
+EXT_CFLAGS = -fPIE -static
+
 @BIND9_MAKE_RULES@
 
+LDFLAGS   += -pie
+
 nsupdate.@O@: nsupdate.c
 	${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
 		-DSESSION_KEYFILE=\"${localstatedir}/run/named/session.key\" \
Index: bin/rndc/Makefile.in
===================================================================
--- bin/rndc/Makefile.in.orig
+++ bin/rndc/Makefile.in
@@ -50,8 +50,12 @@ HTMLPAGES =	rndc.html rndc.conf.html
 
 MANOBJS =	${MANPAGES} ${HTMLPAGES}
 
+EXT_CFLAGS = -fPIE -static
+
 @BIND9_MAKE_RULES@
 
+LDFLAGS   += -pie
+
 rndc.@O@: rndc.c
 	${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
 		-DVERSION=\"${VERSION}\" \
Index: bin/tools/Makefile.in
===================================================================
--- bin/tools/Makefile.in.orig
+++ bin/tools/Makefile.in
@@ -60,8 +60,12 @@ HTMLPAGES =	arpaname.html dnstap-read.ht
 
 MANOBJS =	${MANPAGES} ${HTMLPAGES}
 
+EXT_CFLAGS = -fPIE -static
+
 @BIND9_MAKE_RULES@
 
+LDFLAGS   += -pie
+
 arpaname@EXEEXT@: arpaname.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
 	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \
 		-o $@ arpaname.@O@ ${ISCLIBS} ${LIBS}
Index: contrib/idn/idnkit-1.0-src/tools/idnconv/Makefile.in
===================================================================
--- contrib/idn/idnkit-1.0-src/tools/idnconv/Makefile.in.orig
+++ contrib/idn/idnkit-1.0-src/tools/idnconv/Makefile.in
@@ -68,8 +68,8 @@ IDNLIB = ../../lib/libidnkit.la
 INCS = -I$(srcdir) -I$(srcdir)/../../include -I../../include $(ICONVINC)
 DEFS =
 
-CFLAGS = $(INCS) $(DEFS) @CPPFLAGS@ @CFLAGS@
-LDFLAGS = @LDFLAGS@
+CFLAGS = $(INCS) $(DEFS) @CPPFLAGS@ @CFLAGS@ -fPIE
+LDFLAGS = @LDFLAGS@ -pie
 
 SRCS = idnconv.c util.c selectiveencode.c
 OBJS = idnconv.o util.o selectiveencode.o
Index: contrib/zkt-1.1.3/Makefile.in
===================================================================
--- contrib/zkt-1.1.3/Makefile.in.orig
+++ contrib/zkt-1.1.3/Makefile.in
@@ -13,11 +13,11 @@ PROFILE =	# -pg
 OPTIM	=	# -O3 -DNDEBUG
 
 #CFLAGS	?=	@CFLAGS@ @DEFS@ -I@top_srcdir@
-CFLAGS	+=	-g @DEFS@ -I@top_srcdir@
+CFLAGS	+=	-g @DEFS@ -I@top_srcdir@ -fPIE
 CFLAGS	+=	-Wall #-DDBG
 CFLAGS	+=	-Wmissing-prototypes
 CFLAGS	+=	$(PROFILE) $(OPTIM)
-LDFLAGS	+=	$(PROFILE)
+LDFLAGS	+=	$(PROFILE) -fPIE -pie
 LIBS	=	@LIBS@
 
 PROJECT =	@PACKAGE_TARNAME@
openSUSE Build Service is sponsored by