diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2014-06-08 17:29:31 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2014-06-08 17:29:31 +0000 |
commit | 989e2c600051059839eb88abfc343a905caf37eb (patch) | |
tree | 770fe42f243492477db77896e2564375cd017ad4 /usr.sbin | |
parent | 14c8389ad08e251819c8c35fcaa75e0519595437 (diff) | |
download | FreeBSD-src-989e2c600051059839eb88abfc343a905caf37eb.zip FreeBSD-src-989e2c600051059839eb88abfc343a905caf37eb.tar.gz |
In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE.
This is currently an opt-in build flag. Once ASLR support is ready and stable
it should changed to opt-out and be enabled by default along with ASLR.
Each application Makefile uses opt-out to ensure that ASLR will be enabled by
default in new directories when the system is compiled with PIE/ASLR. [2]
Mark known build failures as NO_PIE for now.
The only known runtime failure was rtld.
[1] http://www.bsdcan.org/2014/schedule/events/452.en.html
Submitted by: Shawn Webb <lattera@gmail.com>
Discussed between: des@ and Shawn Webb [2]
Diffstat (limited to 'usr.sbin')
37 files changed, 74 insertions, 0 deletions
diff --git a/usr.sbin/amd/amd/Makefile b/usr.sbin/amd/amd/Makefile index 1fc41bf..fdcbd60 100644 --- a/usr.sbin/amd/amd/Makefile +++ b/usr.sbin/amd/amd/Makefile @@ -24,6 +24,8 @@ SRCS+= ops_nullfs.c ops_pcfs.c ops_tfs.c ops_ufs.c ops_umapfs.c SRCS+= ops_unionfs.c opts.c readdir.c restart.c rpc_fwd.c sched.c SRCS+= srvr_amfs_auto.c srvr_nfs.c +NO_PIE= yes + CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amd \ -I${DESTDIR}/usr/include/rpcsvc diff --git a/usr.sbin/amd/amq/Makefile b/usr.sbin/amd/amq/Makefile index 74fc749..40257c3 100644 --- a/usr.sbin/amd/amq/Makefile +++ b/usr.sbin/amd/amq/Makefile @@ -17,4 +17,6 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amq DPADD= ${LIBAMU} LDADD= ${LIBAMU} +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/amd/fixmount/Makefile b/usr.sbin/amd/fixmount/Makefile index 7f96a45..1838fb2 100644 --- a/usr.sbin/amd/fixmount/Makefile +++ b/usr.sbin/amd/fixmount/Makefile @@ -18,4 +18,6 @@ SRCS+= checkmount_bsd44.c DPADD= ${LIBAMU} ${LIBRPCSVC} LDADD= ${LIBAMU} -lrpcsvc +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/amd/fsinfo/Makefile b/usr.sbin/amd/fsinfo/Makefile index 1695a46..83becb2 100644 --- a/usr.sbin/amd/fsinfo/Makefile +++ b/usr.sbin/amd/fsinfo/Makefile @@ -13,6 +13,8 @@ SRCS= fsi_gram.y fsi_lex.l SRCS+= fsi_analyze.c fsi_dict.c fsi_util.c fsinfo.c wr_atab.c SRCS+= wr_bparam.c wr_dumpset.c wr_exportfs.c wr_fstab.c +NO_PIE= yes + CFLAGS+= -I${.CURDIR}/../../../contrib/amd/fsinfo DPADD= ${LIBAMU} diff --git a/usr.sbin/amd/hlfsd/Makefile b/usr.sbin/amd/hlfsd/Makefile index 5b863dd..dca94da 100644 --- a/usr.sbin/amd/hlfsd/Makefile +++ b/usr.sbin/amd/hlfsd/Makefile @@ -16,4 +16,6 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/amd/hlfsd DPADD= ${LIBAMU} LDADD= ${LIBAMU} +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/amd/mk-amd-map/Makefile b/usr.sbin/amd/mk-amd-map/Makefile index 57fd6a5..bed9e30 100644 --- a/usr.sbin/amd/mk-amd-map/Makefile +++ b/usr.sbin/amd/mk-amd-map/Makefile @@ -13,4 +13,6 @@ MAN= mk-amd-map.8 DPADD= ${LIBAMU} LDADD= ${LIBAMU} +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/amd/pawd/Makefile b/usr.sbin/amd/pawd/Makefile index c6bb1cc..612aced 100644 --- a/usr.sbin/amd/pawd/Makefile +++ b/usr.sbin/amd/pawd/Makefile @@ -17,4 +17,6 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amq DPADD= ${LIBAMU} LDADD= ${LIBAMU} +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/amd/wire-test/Makefile b/usr.sbin/amd/wire-test/Makefile index a07e690..f960768 100644 --- a/usr.sbin/amd/wire-test/Makefile +++ b/usr.sbin/amd/wire-test/Makefile @@ -13,4 +13,6 @@ MAN= wire-test.8 DPADD= ${LIBAMU} LDADD= ${LIBAMU} +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/btxld/Makefile b/usr.sbin/btxld/Makefile index 32cf99d..8df8fa1 100644 --- a/usr.sbin/btxld/Makefile +++ b/usr.sbin/btxld/Makefile @@ -4,4 +4,6 @@ PROG= btxld MAN= btxld.8 SRCS= btxld.c elfh.c +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/cron/cron/Makefile b/usr.sbin/cron/cron/Makefile index d9a1d24..c7762f1 100644 --- a/usr.sbin/cron/cron/Makefile +++ b/usr.sbin/cron/cron/Makefile @@ -11,4 +11,6 @@ LDADD= ${LIBCRON} ${MINUSLPAM} -lutil WARNS?= 2 +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/cron/crontab/Makefile b/usr.sbin/cron/crontab/Makefile index 829128e..cd9600a 100644 --- a/usr.sbin/cron/crontab/Makefile +++ b/usr.sbin/cron/crontab/Makefile @@ -15,4 +15,6 @@ CFLAGS+= -I${.CURDIR}/../cron DPADD= ${LIBCRON} ${LIBMD} ${LIBUTIL} LDADD= ${LIBCRON} -lmd -lutil +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/crunch/crunchgen/Makefile b/usr.sbin/crunch/crunchgen/Makefile index 8d0a78b..7b07f2b 100644 --- a/usr.sbin/crunch/crunchgen/Makefile +++ b/usr.sbin/crunch/crunchgen/Makefile @@ -4,6 +4,8 @@ PROG= crunchgen SRCS= crunchgen.c crunched_skel.c CLEANFILES+= crunched_skel.c +NO_PIE= yes + crunched_skel.c: crunched_main.c sh -e ${.CURDIR}/mkskel.sh ${.CURDIR}/crunched_main.c >crunched_skel.c diff --git a/usr.sbin/crunch/crunchide/Makefile b/usr.sbin/crunch/crunchide/Makefile index 2a6c500..c959a3e 100644 --- a/usr.sbin/crunch/crunchide/Makefile +++ b/usr.sbin/crunch/crunchide/Makefile @@ -3,6 +3,8 @@ PROG= crunchide SRCS= crunchide.c +NO_PIE= yes + TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == i386 && ${MACHINE_ARCH} == i386 diff --git a/usr.sbin/editmap/Makefile b/usr.sbin/editmap/Makefile index 92d8392..8b4562c 100644 --- a/usr.sbin/editmap/Makefile +++ b/usr.sbin/editmap/Makefile @@ -33,6 +33,8 @@ DPADD+=${SENDMAIL_DPADD} LDADD+=${SENDMAIL_LDADD} LDFLAGS+=${SENDMAIL_LDFLAGS} +NO_PIE= yes + sm_os.h: ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h diff --git a/usr.sbin/fifolog/fifolog_create/Makefile b/usr.sbin/fifolog/fifolog_create/Makefile index 8b59b25..38a6623 100644 --- a/usr.sbin/fifolog/fifolog_create/Makefile +++ b/usr.sbin/fifolog/fifolog_create/Makefile @@ -12,6 +12,8 @@ MLINKS= fifolog.1 fifolog_create.1 \ fifolog.1 fifolog_reader.1 \ fifolog.1 fifolog_writer.1 +NO_PIE= yes + regress: rm -f /tmp/fifolog.? ./${PROG} /tmp/fifolog.0 diff --git a/usr.sbin/fifolog/fifolog_reader/Makefile b/usr.sbin/fifolog/fifolog_reader/Makefile index c88f10e..dfbb73f 100644 --- a/usr.sbin/fifolog/fifolog_reader/Makefile +++ b/usr.sbin/fifolog/fifolog_reader/Makefile @@ -9,6 +9,8 @@ MAN= DPADD= ${LIBFIFOLOG} ${LIBUTIL} ${LIBZ} LDADD= ${LIBFIFOLOG} -lutil -lz +NO_PIE= yes + regress: ./${PROG} /tmp/fifolog.0 ./${PROG} -t /tmp/fifolog.0 diff --git a/usr.sbin/fifolog/fifolog_writer/Makefile b/usr.sbin/fifolog/fifolog_writer/Makefile index 9d802c7..3e6e377 100644 --- a/usr.sbin/fifolog/fifolog_writer/Makefile +++ b/usr.sbin/fifolog/fifolog_writer/Makefile @@ -9,6 +9,8 @@ MAN= DPADD= ${LIBFIFOLOG} ${LIBUTIL} ${LIBZ} LDADD= ${LIBFIFOLOG} -lutil -lz +NO_PIE= yes + regress: date | ./${PROG} -z 0 /tmp/fifolog.0 lptest 65 | ./${PROG} -z 9 /tmp/fifolog.1 diff --git a/usr.sbin/ftp-proxy/ftp-proxy/Makefile b/usr.sbin/ftp-proxy/ftp-proxy/Makefile index de49888..686bac4 100644 --- a/usr.sbin/ftp-proxy/ftp-proxy/Makefile +++ b/usr.sbin/ftp-proxy/ftp-proxy/Makefile @@ -14,4 +14,6 @@ DPADD+= ${LIBEVENT} WARNS?= 3 +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/lpr/chkprintcap/Makefile b/usr.sbin/lpr/chkprintcap/Makefile index ffffffb..1ea2254 100644 --- a/usr.sbin/lpr/chkprintcap/Makefile +++ b/usr.sbin/lpr/chkprintcap/Makefile @@ -11,4 +11,6 @@ CFLAGS+= -I${.CURDIR}/../common_source DPADD= ${LIBLPR} LDADD= ${LIBLPR} +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/lpr/lpc/Makefile b/usr.sbin/lpr/lpc/Makefile index 35fa52a..65a8010 100644 --- a/usr.sbin/lpr/lpc/Makefile +++ b/usr.sbin/lpr/lpc/Makefile @@ -16,4 +16,6 @@ WARNS?= 0 DPADD= ${LIBLPR} ${LIBEDIT} ${LIBTERMCAP} LDADD= ${LIBLPR} -ledit -ltermcap +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/lpr/lpd/Makefile b/usr.sbin/lpr/lpd/Makefile index 0d7d93e..bd3e25a 100644 --- a/usr.sbin/lpr/lpd/Makefile +++ b/usr.sbin/lpr/lpd/Makefile @@ -12,4 +12,6 @@ WARNS?= 1 DPADD= ${LIBLPR} LDADD= ${LIBLPR} +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/lpr/lpq/Makefile b/usr.sbin/lpr/lpq/Makefile index 4df437e..1c2504b 100644 --- a/usr.sbin/lpr/lpq/Makefile +++ b/usr.sbin/lpr/lpq/Makefile @@ -13,4 +13,6 @@ CFLAGS+= -I${.CURDIR}/../common_source DPADD= ${LIBLPR} LDADD= ${LIBLPR} +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/lpr/lpr/Makefile b/usr.sbin/lpr/lpr/Makefile index 1894b00..cfeebb0 100644 --- a/usr.sbin/lpr/lpr/Makefile +++ b/usr.sbin/lpr/lpr/Makefile @@ -18,4 +18,6 @@ WARNS?= 2 DPADD= ${LIBLPR} LDADD= ${LIBLPR} +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/lpr/lprm/Makefile b/usr.sbin/lpr/lprm/Makefile index 44bc93a..bd7e321 100644 --- a/usr.sbin/lpr/lprm/Makefile +++ b/usr.sbin/lpr/lprm/Makefile @@ -15,4 +15,6 @@ CFLAGS+= -I${.CURDIR}/../common_source DPADD= ${LIBLPR} LDADD= ${LIBLPR} +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/lpr/pac/Makefile b/usr.sbin/lpr/pac/Makefile index bd895a7..3a157c9 100644 --- a/usr.sbin/lpr/pac/Makefile +++ b/usr.sbin/lpr/pac/Makefile @@ -11,4 +11,6 @@ CFLAGS+= -I${.CURDIR}/../common_source DPADD= ${LIBLPR} LDADD= ${LIBLPR} +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/mailstats/Makefile b/usr.sbin/mailstats/Makefile index bd72fc6..a3cd562 100644 --- a/usr.sbin/mailstats/Makefile +++ b/usr.sbin/mailstats/Makefile @@ -31,6 +31,8 @@ DPADD+= ${SENDMAIL_DPADD} LDADD+= ${SENDMAIL_LDADD} LDFLAGS+= ${SENDMAIL_LDFLAGS} +NO_PIE= yes + sm_os.h: ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h diff --git a/usr.sbin/makefs/Makefile b/usr.sbin/makefs/Makefile index 6253148..0e03fd3 100644 --- a/usr.sbin/makefs/Makefile +++ b/usr.sbin/makefs/Makefile @@ -38,4 +38,6 @@ LDADD+= ${LIBNETBSD} DPADD+= ${LIBSBUF} ${LIBUTIL} LDADD+= -lsbuf -lutil +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/makemap/Makefile b/usr.sbin/makemap/Makefile index 80cafcb..2c2eef5 100644 --- a/usr.sbin/makemap/Makefile +++ b/usr.sbin/makemap/Makefile @@ -34,6 +34,8 @@ DPADD+=${SENDMAIL_DPADD} LDADD+=${SENDMAIL_LDADD} LDFLAGS+=${SENDMAIL_LDFLAGS} +NO_PIE= yes + sm_os.h: ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h diff --git a/usr.sbin/nmtree/Makefile b/usr.sbin/nmtree/Makefile index 9d24c0c..e09f3c4 100644 --- a/usr.sbin/nmtree/Makefile +++ b/usr.sbin/nmtree/Makefile @@ -23,4 +23,6 @@ LDADD+= ${LIBNETBSD} LINKS= ${BINDIR}/mtree ${BINDIR}/nmtree MLINKS= mtree.8 nmtree.8 +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/ntp/ntp-keygen/Makefile b/usr.sbin/ntp/ntp-keygen/Makefile index 78308fa..5075350 100644 --- a/usr.sbin/ntp/ntp-keygen/Makefile +++ b/usr.sbin/ntp/ntp-keygen/Makefile @@ -21,4 +21,6 @@ DPADD+= ${LIBMD} ${LIBCRYPTO} LDADD+= -lmd -lcrypto .endif +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/ntp/ntpd/Makefile b/usr.sbin/ntp/ntpd/Makefile index 87b2d72..3422ad2 100644 --- a/usr.sbin/ntp/ntpd/Makefile +++ b/usr.sbin/ntp/ntpd/Makefile @@ -4,6 +4,8 @@ MAN= .include <src.opts.mk> +NO_PIE= yes + .PATH: ${.CURDIR}/../../../contrib/ntp/ntpd PROG= ntpd diff --git a/usr.sbin/ntp/ntpdate/Makefile b/usr.sbin/ntp/ntpdate/Makefile index f55ec92..ea0fe1e 100644 --- a/usr.sbin/ntp/ntpdate/Makefile +++ b/usr.sbin/ntp/ntpdate/Makefile @@ -13,6 +13,8 @@ LDADD= ${LIBNTP} -lm -lmd -lrt CLEANFILES+= .version version.c +NO_PIE= yes + version.c: sh -e ${.CURDIR}/../scripts/mkver ntpdate diff --git a/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile index 81d2671..d4ea36f 100644 --- a/usr.sbin/ntp/ntpdc/Makefile +++ b/usr.sbin/ntp/ntpdc/Makefile @@ -22,6 +22,8 @@ CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \ CLEANFILES+= .version version.c +NO_PIE= yes + version.c: sh -e ${.CURDIR}/../scripts/mkver ntpdc diff --git a/usr.sbin/ntp/ntpq/Makefile b/usr.sbin/ntp/ntpq/Makefile index eb42973..7fcdd2b 100644 --- a/usr.sbin/ntp/ntpq/Makefile +++ b/usr.sbin/ntp/ntpq/Makefile @@ -24,6 +24,8 @@ CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \ CLEANFILES+= .version version.c +NO_PIE= yes + version.c: sh -e ${.CURDIR}/../scripts/mkver ntpq diff --git a/usr.sbin/ntp/ntptime/Makefile b/usr.sbin/ntp/ntptime/Makefile index d3bf7a7..af3f905 100644 --- a/usr.sbin/ntp/ntptime/Makefile +++ b/usr.sbin/ntp/ntptime/Makefile @@ -10,4 +10,6 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ DPADD= ${LIBNTP} LDADD= ${LIBNTP} +NO_PIE= yes + .include <bsd.prog.mk> diff --git a/usr.sbin/praliases/Makefile b/usr.sbin/praliases/Makefile index 120028d..e1a9a2a 100644 --- a/usr.sbin/praliases/Makefile +++ b/usr.sbin/praliases/Makefile @@ -34,6 +34,8 @@ LDFLAGS+=${SENDMAIL_LDFLAGS} DPADD+= ${SENDMAIL_DPADD} LDADD+= ${SENDMAIL_LDADD} +NO_PIE= yes + sm_os.h: ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h diff --git a/usr.sbin/sendmail/Makefile b/usr.sbin/sendmail/Makefile index 893b6fd..ffd22bd 100644 --- a/usr.sbin/sendmail/Makefile +++ b/usr.sbin/sendmail/Makefile @@ -7,6 +7,8 @@ SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail SMDIR= ${SENDMAIL_DIR}/src .PATH: ${SMDIR} +NO_PIE= yes + BINDIR= /usr/libexec/sendmail PROG= sendmail |