diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2014-08-19 15:04:32 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2014-08-19 15:04:32 +0000 |
commit | b619f0c74719d87f58b0ea0053805b7423cdab28 (patch) | |
tree | f5585fe1edc0507d12a8ac9729befa9b67327239 /gnu/usr.bin/groff/src | |
parent | df507d931047ee5a6db9840d4f900c0ad539717c (diff) | |
download | FreeBSD-src-b619f0c74719d87f58b0ea0053805b7423cdab28.zip FreeBSD-src-b619f0c74719d87f58b0ea0053805b7423cdab28.tar.gz |
Revert r267233 for now. PIE support needs to be reworked.
1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other
build-only utility libraries.
2. Another 40% is fixed by generating _pic.a variants of various libraries.
3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR)
where it never would work anyhow, such as csu or loader. This suggests
there may be better ways of adding support to the tree. Many of these
cases can be fixed such that -fPIE will work but there is really no
reason to have it in those cases.
4. Some of the uses are working around hacks done to some Makefiles that are
really building libraries but have been using bsd.prog.mk because the code
is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have
been needed.
We likely do want to enable PIE by default (opt-out) for non-tree consumers
(such as ports). For in-tree though we probably want to only enable PIE
(opt-in) for common attack targets such as remote service daemons and setuid
utilities. This is also a great performance compromise since ASLR is expected
to reduce performance. As such it does not make sense to enable it in all
utilities such as ls(1) that have little benefit to having it enabled.
Reported by: kib
Diffstat (limited to 'gnu/usr.bin/groff/src')
21 files changed, 0 insertions, 42 deletions
diff --git a/gnu/usr.bin/groff/src/devices/grodvi/Makefile b/gnu/usr.bin/groff/src/devices/grodvi/Makefile index 7c88f04..3745440 100644 --- a/gnu/usr.bin/groff/src/devices/grodvi/Makefile +++ b/gnu/usr.bin/groff/src/devices/grodvi/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} LDADD= ${LIBDRIVER} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/devices/grohtml/Makefile b/gnu/usr.bin/groff/src/devices/grohtml/Makefile index 4d30338..321f1c8 100644 --- a/gnu/usr.bin/groff/src/devices/grohtml/Makefile +++ b/gnu/usr.bin/groff/src/devices/grohtml/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} LDADD= ${LIBDRIVER} ${LIBGROFF} -lm MAN= -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/devices/grolbp/Makefile b/gnu/usr.bin/groff/src/devices/grolbp/Makefile index 69511e0..85a41c1 100644 --- a/gnu/usr.bin/groff/src/devices/grolbp/Makefile +++ b/gnu/usr.bin/groff/src/devices/grolbp/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} LDADD= ${LIBDRIVER} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/devices/grolj4/Makefile b/gnu/usr.bin/groff/src/devices/grolj4/Makefile index 51a003f..bb3f9e4 100644 --- a/gnu/usr.bin/groff/src/devices/grolj4/Makefile +++ b/gnu/usr.bin/groff/src/devices/grolj4/Makefile @@ -7,6 +7,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} LDADD= ${LIBDRIVER} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/devices/grops/Makefile b/gnu/usr.bin/groff/src/devices/grops/Makefile index 4933dbb..4511f69 100644 --- a/gnu/usr.bin/groff/src/devices/grops/Makefile +++ b/gnu/usr.bin/groff/src/devices/grops/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} LDADD= ${LIBDRIVER} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/devices/grotty/Makefile b/gnu/usr.bin/groff/src/devices/grotty/Makefile index 78d6498..d15ee8b 100644 --- a/gnu/usr.bin/groff/src/devices/grotty/Makefile +++ b/gnu/usr.bin/groff/src/devices/grotty/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} LDADD= ${LIBDRIVER} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/preproc/eqn/Makefile b/gnu/usr.bin/groff/src/preproc/eqn/Makefile index 9e53be6..80871fe 100644 --- a/gnu/usr.bin/groff/src/preproc/eqn/Makefile +++ b/gnu/usr.bin/groff/src/preproc/eqn/Makefile @@ -11,8 +11,6 @@ SCRIPTS= neqn MAN= eqn.1 neqn.1 CLEANFILES= eqn.cpp eqn_tab.h ${SCRIPTS} ${MAN} y.tab.c y.tab.h -NO_PIE= yes - eqn_tab.h: eqn.cpp .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/preproc/grn/Makefile b/gnu/usr.bin/groff/src/preproc/grn/Makefile index d859270..58309d2 100644 --- a/gnu/usr.bin/groff/src/preproc/grn/Makefile +++ b/gnu/usr.bin/groff/src/preproc/grn/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/preproc/html/Makefile b/gnu/usr.bin/groff/src/preproc/html/Makefile index 4e82fd1..d46626b 100644 --- a/gnu/usr.bin/groff/src/preproc/html/Makefile +++ b/gnu/usr.bin/groff/src/preproc/html/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} LDADD= ${LIBGROFF} MAN= -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/preproc/pic/Makefile b/gnu/usr.bin/groff/src/preproc/pic/Makefile index 2d14d0a..3b5939c 100644 --- a/gnu/usr.bin/groff/src/preproc/pic/Makefile +++ b/gnu/usr.bin/groff/src/preproc/pic/Makefile @@ -8,8 +8,6 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= ${MAN} pic.cpp pic_tab.h y.tab.c y.tab.h -NO_PIE= yes - pic_tab.h: pic.cpp .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/preproc/refer/Makefile b/gnu/usr.bin/groff/src/preproc/refer/Makefile index ce82c70..8a18f6f 100644 --- a/gnu/usr.bin/groff/src/preproc/refer/Makefile +++ b/gnu/usr.bin/groff/src/preproc/refer/Makefile @@ -7,6 +7,4 @@ DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} LDADD= ${LIBBIB} ${LIBGROFF} -lm CLEANFILES= label.cpp label_tab.h ${MAN} y.tab.c y.tab.h -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/preproc/soelim/Makefile b/gnu/usr.bin/groff/src/preproc/soelim/Makefile index 8567a44..2c68b80 100644 --- a/gnu/usr.bin/groff/src/preproc/soelim/Makefile +++ b/gnu/usr.bin/groff/src/preproc/soelim/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} LDADD= ${LIBGROFF} CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/preproc/tbl/Makefile b/gnu/usr.bin/groff/src/preproc/tbl/Makefile index 83bde82..29e7ac2 100644 --- a/gnu/usr.bin/groff/src/preproc/tbl/Makefile +++ b/gnu/usr.bin/groff/src/preproc/tbl/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/roff/groff/Makefile b/gnu/usr.bin/groff/src/roff/groff/Makefile index 576507c..2ae541b 100644 --- a/gnu/usr.bin/groff/src/roff/groff/Makefile +++ b/gnu/usr.bin/groff/src/roff/groff/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/roff/troff/Makefile b/gnu/usr.bin/groff/src/roff/troff/Makefile index 5c3b837..802af2b 100644 --- a/gnu/usr.bin/groff/src/roff/troff/Makefile +++ b/gnu/usr.bin/groff/src/roff/troff/Makefile @@ -7,8 +7,6 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= majorminor.cpp ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> majorminor.cpp: ${GROFF_DIST}/VERSION ${GROFF_DIST}/REVISION diff --git a/gnu/usr.bin/groff/src/utils/addftinfo/Makefile b/gnu/usr.bin/groff/src/utils/addftinfo/Makefile index ea3b7a2..26fbb57 100644 --- a/gnu/usr.bin/groff/src/utils/addftinfo/Makefile +++ b/gnu/usr.bin/groff/src/utils/addftinfo/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} LDADD= ${LIBGROFF} CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/utils/hpftodit/Makefile b/gnu/usr.bin/groff/src/utils/hpftodit/Makefile index 512ca1b..1376702 100644 --- a/gnu/usr.bin/groff/src/utils/hpftodit/Makefile +++ b/gnu/usr.bin/groff/src/utils/hpftodit/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/utils/indxbib/Makefile b/gnu/usr.bin/groff/src/utils/indxbib/Makefile index 86eb4fb..b2c59a2 100644 --- a/gnu/usr.bin/groff/src/utils/indxbib/Makefile +++ b/gnu/usr.bin/groff/src/utils/indxbib/Makefile @@ -6,8 +6,6 @@ DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} LDADD= ${LIBBIB} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - beforeinstall: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ ${DIST_DIR}/eign ${DESTDIR}${SHAREDIR}/dict/ diff --git a/gnu/usr.bin/groff/src/utils/lkbib/Makefile b/gnu/usr.bin/groff/src/utils/lkbib/Makefile index 42fbd63..f30dc56 100644 --- a/gnu/usr.bin/groff/src/utils/lkbib/Makefile +++ b/gnu/usr.bin/groff/src/utils/lkbib/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} LDADD= ${LIBBIB} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/utils/lookbib/Makefile b/gnu/usr.bin/groff/src/utils/lookbib/Makefile index e2ea17d..18834a7 100644 --- a/gnu/usr.bin/groff/src/utils/lookbib/Makefile +++ b/gnu/usr.bin/groff/src/utils/lookbib/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} LDADD= ${LIBBIB} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile b/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile index 1b0434f..ba3bbc5 100644 --- a/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile +++ b/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include <bsd.prog.mk> |