summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2017-08-10 20:22:39 +0900
committerSeonah Moon <seonah1.moon@samsung.com>2019-08-19 11:15:22 +0900
commite2ef38509912c77bbf9419d464fb714eb0a3d790 (patch)
treec2d8d97a711481e78c61fa430e66988e797b7738
parentc12432d27ecd9cae6612a614d6da05f12d9a6c8d (diff)
downloadbind-e2ef38509912c77bbf9419d464fb714eb0a3d790.tar.gz
bind-e2ef38509912c77bbf9419d464fb714eb0a3d790.tar.bz2
bind-e2ef38509912c77bbf9419d464fb714eb0a3d790.zip
Change-Id: I5e96ddea957fea982913d79435e44c8a7eca8840
-rw-r--r--bin/dnssec/Makefile.in6
-rw-r--r--bin/named/Makefile.in8
-rw-r--r--bin/tools/Makefile.in2
-rw-r--r--make/rules.in18
4 files changed, 20 insertions, 14 deletions
diff --git a/bin/dnssec/Makefile.in b/bin/dnssec/Makefile.in
index 097015ff..0e385247 100644
--- a/bin/dnssec/Makefile.in
+++ b/bin/dnssec/Makefile.in
@@ -94,15 +94,15 @@ dnssec-verify@EXEEXT@: dnssec-verify.@O@ ${OBJS} ${DEPLIBS}
${FINALBUILDCMD}
dnssec-revoke@EXEEXT@: dnssec-revoke.@O@ ${OBJS} ${DEPLIBS}
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ASLR_CFLAGS} ${ASLR_LDFLAGS} -o $@ \
dnssec-revoke.@O@ ${OBJS} ${LIBS}
dnssec-settime@EXEEXT@: dnssec-settime.@O@ ${OBJS} ${DEPLIBS}
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ASLR_CFLAGS} ${ASLR_LDFLAGS} -o $@ \
dnssec-settime.@O@ ${OBJS} ${LIBS}
dnssec-importkey@EXEEXT@: dnssec-importkey.@O@ ${OBJS} ${DEPLIBS}
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ASLR_CFLAGS} ${ASLR_LDFLAGS} -o $@ \
dnssec-importkey.@O@ ${OBJS} ${LIBS}
doc man:: ${MANOBJS}
diff --git a/bin/named/Makefile.in b/bin/named/Makefile.in
index 40f506cf..e9d983cc 100644
--- a/bin/named/Makefile.in
+++ b/bin/named/Makefile.in
@@ -120,7 +120,7 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
main.@O@: main.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
+ ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS_WITH_ASLR} \
-DVERSION=\"${VERSION}\" \
-DPRODUCT=\"${PRODUCT}\" \
-DDESCRIPTION=\"${DESCRIPTION}\" \
@@ -131,7 +131,7 @@ main.@O@: main.c
-DNAMED_SYSCONFDIR=\"${sysconfdir}\" -c ${srcdir}/main.c
config.@O@: config.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
+ ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS_WITH_ASLR} \
-DVERSION=\"${VERSION}\" \
-DSRCID=\"${SRCID}\" \
-DDYNDB_LIBDIR=\"@libdir@/bind\" \
@@ -141,7 +141,7 @@ config.@O@: config.c
-c ${srcdir}/config.c
server.@O@: server.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
+ ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS_WITH_ASLR} \
-DPRODUCT=\"${PRODUCT}\" \
-DVERSION=\"${VERSION}\" -c ${srcdir}/server.c
@@ -184,4 +184,4 @@ uninstall::
@DLZ_DRIVER_RULES@
named-symtbl.@O@: named-symtbl.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c named-symtbl.c
+ ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS_WITH_ASLR} -c named-symtbl.c
diff --git a/bin/tools/Makefile.in b/bin/tools/Makefile.in
index d1530976..a67c125c 100644
--- a/bin/tools/Makefile.in
+++ b/bin/tools/Makefile.in
@@ -64,7 +64,7 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
arpaname@EXEEXT@: arpaname.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ASLR_CFLAGS} ${ASLR_LDFLAGS} \
-o $@ arpaname.@O@ ${ISCLIBS} ${LIBS}
named-journalprint@EXEEXT@: named-journalprint.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
diff --git a/make/rules.in b/make/rules.in
index 86456eb4..41d395aa 100644
--- a/make/rules.in
+++ b/make/rules.in
@@ -123,6 +123,9 @@ LFS_LIBS = @LFS_LIBS@
MAXMINDDB_CFLAGS = @MAXMINDDB_CFLAGS@
MAXMINDDB_LIBS = @MAXMINDDB_LIBS@
+ASLR_CFLAGS = ${CFLAGS} -fPIE
+ASLR_LDFLAGS = ${LDFLAGS} -pie
+
.SUFFIXES:
.SUFFIXES: .c .@O@
@@ -137,6 +140,9 @@ ALL_CPPFLAGS = \
ALL_CFLAGS = ${EXT_CFLAGS} ${ALL_CPPFLAGS} ${CFLAGS} \
${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS}
+ALL_CFLAGS_WITH_ASLR = ${EXT_CFLAGS} ${ALL_CPPFLAGS} ${ASLR_CFLAGS} \
+ ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS}
+
@BIND9_CO_RULE@
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $<
@@ -195,24 +201,24 @@ MKDEP = ${SHELL} ${top_builddir}/make/mkdep
### See bin/check/Makefile.in for a complete example of the use of LIBS0.
###
FINALBUILDCMD = if [ X"${MKSYMTBL_PROGRAM}" = X -o X"$${MAKE_SYMTABLE:-${ALWAYS_MAKE_SYMTABLE}}" = X ] ; then \
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS_WITH_ASLR} ${ASLR_LDFLAGS} \
-o $@ $${BASEOBJS} $${LIBS0} ${LIBS}; \
else \
rm -f $@tmp0; \
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS_WITH_ASLR} ${ASLR_LDFLAGS} \
-o $@tmp0 $${BASEOBJS} $${LIBS0} ${LIBS} || exit 1; \
rm -f $@-symtbl.c $@-symtbl.@O@; \
${MKSYMTBL_PROGRAM} ${top_srcdir}/util/mksymtbl.pl \
-o $@-symtbl.c $@tmp0 || exit 1; \
$(MAKE) $@-symtbl.@O@ || exit 1; \
rm -f $@tmp1; \
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS_WITH_ASLR} ${ASLR_LDFLAGS} \
-o $@tmp1 $${BASEOBJS} $@-symtbl.@O@ $${LIBS0} ${NOSYMLIBS} || exit 1; \
rm -f $@-symtbl.c $@-symtbl.@O@; \
${MKSYMTBL_PROGRAM} ${top_srcdir}/util/mksymtbl.pl \
-o $@-symtbl.c $@tmp1 || exit 1; \
$(MAKE) $@-symtbl.@O@ || exit 1; \
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS_WITH_ASLR} ${ASLR_LDFLAGS} \
-o $@tmp2 $${BASEOBJS} $@-symtbl.@O@ $${LIBS0} ${NOSYMLIBS}; \
${MKSYMTBL_PROGRAM} ${top_srcdir}/util/mksymtbl.pl \
-o $@-symtbl2.c $@tmp2; \
@@ -225,8 +231,8 @@ FINALBUILDCMD = if [ X"${MKSYMTBL_PROGRAM}" = X -o X"$${MAKE_SYMTABLE:-${ALWAYS_
${MKSYMTBL_PROGRAM} ${top_srcdir}/util/mksymtbl.pl \
-o $@-symtbl.c $@tmp2 || exit 1; \
$(MAKE) $@-symtbl.@O@ || exit 1; \
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} \
- ${LDFLAGS} -o $@tmp2 $${BASEOBJS} $@-symtbl.@O@ \
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS_WITH_ASLR} \
+ ${ASLR_LDFLAGS} -o $@tmp2 $${BASEOBJS} $@-symtbl.@O@ \
$${LIBS0} ${NOSYMLIBS}; \
${MKSYMTBL_PROGRAM} ${top_srcdir}/util/mksymtbl.pl \
-o $@-symtbl2.c $@tmp2; \