summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2014-08-19 15:04:32 +0000
committerbdrewery <bdrewery@FreeBSD.org>2014-08-19 15:04:32 +0000
commitb619f0c74719d87f58b0ea0053805b7423cdab28 (patch)
treef5585fe1edc0507d12a8ac9729befa9b67327239 /usr.bin
parentdf507d931047ee5a6db9840d4f900c0ad539717c (diff)
downloadFreeBSD-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 'usr.bin')
-rw-r--r--usr.bin/clang/clang-tblgen/Makefile2
-rw-r--r--usr.bin/clang/clang.prog.mk2
-rw-r--r--usr.bin/clang/tblgen/Makefile2
-rw-r--r--usr.bin/compile_et/Makefile2
-rw-r--r--usr.bin/mandoc/Makefile2
-rw-r--r--usr.bin/svn/svn/Makefile2
-rw-r--r--usr.bin/svn/svnadmin/Makefile2
-rw-r--r--usr.bin/svn/svndumpfilter/Makefile2
-rw-r--r--usr.bin/svn/svnlook/Makefile2
-rw-r--r--usr.bin/svn/svnmucc/Makefile2
-rw-r--r--usr.bin/svn/svnrdump/Makefile2
-rw-r--r--usr.bin/svn/svnserve/Makefile2
-rw-r--r--usr.bin/svn/svnsync/Makefile2
-rw-r--r--usr.bin/svn/svnversion/Makefile2
-rw-r--r--usr.bin/telnet/Makefile2
-rw-r--r--usr.bin/vacation/Makefile2
16 files changed, 0 insertions, 32 deletions
diff --git a/usr.bin/clang/clang-tblgen/Makefile b/usr.bin/clang/clang-tblgen/Makefile
index 34e7aeb..0f64ad3 100644
--- a/usr.bin/clang/clang-tblgen/Makefile
+++ b/usr.bin/clang/clang-tblgen/Makefile
@@ -19,6 +19,4 @@ SRCS= ClangASTNodesEmitter.cpp \
LIBDEPS=llvmtablegen \
llvmsupport
-NO_PIE= yes
-
.include "../clang.prog.mk"
diff --git a/usr.bin/clang/clang.prog.mk b/usr.bin/clang/clang.prog.mk
index 1b4e126..538c55a 100644
--- a/usr.bin/clang/clang.prog.mk
+++ b/usr.bin/clang/clang.prog.mk
@@ -1,7 +1,5 @@
# $FreeBSD$
-NO_PIE= yes
-
LLVM_SRCS= ${.CURDIR}/../../../contrib/llvm
.include "../../lib/clang/clang.build.mk"
diff --git a/usr.bin/clang/tblgen/Makefile b/usr.bin/clang/tblgen/Makefile
index 31fdc20..f06150e 100644
--- a/usr.bin/clang/tblgen/Makefile
+++ b/usr.bin/clang/tblgen/Makefile
@@ -42,6 +42,4 @@ SRCS= AsmMatcherEmitter.cpp \
LIBDEPS=llvmtablegen \
llvmsupport
-NO_PIE= yes
-
.include "../clang.prog.mk"
diff --git a/usr.bin/compile_et/Makefile b/usr.bin/compile_et/Makefile
index 122d745..d7177b2 100644
--- a/usr.bin/compile_et/Makefile
+++ b/usr.bin/compile_et/Makefile
@@ -12,6 +12,4 @@ CFLAGS+=-I. -I${.CURDIR}/../../contrib/com_err
WARNS?= 0
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.bin/mandoc/Makefile b/usr.bin/mandoc/Makefile
index eb50978..ed88f4e 100644
--- a/usr.bin/mandoc/Makefile
+++ b/usr.bin/mandoc/Makefile
@@ -19,6 +19,4 @@ CFLAGS+= -DHAVE_CONFIG_H
DPADD= ${LIBMANDOC}
LDADD= ${LIBMANDOC}
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.bin/svn/svn/Makefile b/usr.bin/svn/svn/Makefile
index d6944f1..796231f 100644
--- a/usr.bin/svn/svn/Makefile
+++ b/usr.bin/svn/svn/Makefile
@@ -6,8 +6,6 @@
PROG= svn${SVNLITE}
-NO_PIE= yes
-
SRCS= add-cmd.c blame-cmd.c cat-cmd.c changelist-cmd.c checkout-cmd.c \
cl-conflicts.c cleanup-cmd.c commit-cmd.c conflict-callbacks.c \
copy-cmd.c delete-cmd.c deprecated.c diff-cmd.c export-cmd.c \
diff --git a/usr.bin/svn/svnadmin/Makefile b/usr.bin/svn/svnadmin/Makefile
index c173d3b..3220cde 100644
--- a/usr.bin/svn/svnadmin/Makefile
+++ b/usr.bin/svn/svnadmin/Makefile
@@ -34,6 +34,4 @@ DPADD= ${LIBSVN_REPOS} ${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} \
${LIBSVN_DELTA} ${LIBSVN_SUBR} ${LIBAPR_UTIL} \
${LIBBSDXML} ${LIBAPR} ${LIBSQLITE} ${LIBZ} ${LIBCRYPT}
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.bin/svn/svndumpfilter/Makefile b/usr.bin/svn/svndumpfilter/Makefile
index 6746735..864f376 100644
--- a/usr.bin/svn/svndumpfilter/Makefile
+++ b/usr.bin/svn/svndumpfilter/Makefile
@@ -34,6 +34,4 @@ DPADD= ${LIBSVN_REPOS} ${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} \
${LIBSVN_DELTA} ${LIBSVN_SUBR} ${LIBAPR_UTIL} \
${LIBBSDXML} ${LIBAPR} ${LIBSQLITE} ${LIBZ} ${LIBCRYPT}
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.bin/svn/svnlook/Makefile b/usr.bin/svn/svnlook/Makefile
index 209b2f1..3d8b1a0 100644
--- a/usr.bin/svn/svnlook/Makefile
+++ b/usr.bin/svn/svnlook/Makefile
@@ -35,6 +35,4 @@ DPADD= ${LIBSVN_REPOS} ${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} \
${LIBSVN_DELTA} ${LIBSVN_DIFF} ${LIBSVN_SUBR} ${LIBAPR_UTIL} \
${LIBBSDXML} ${LIBAPR} ${LIBSQLITE} ${LIBZ} ${LIBCRYPT}
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.bin/svn/svnmucc/Makefile b/usr.bin/svn/svnmucc/Makefile
index 34e706e..23a98e3 100644
--- a/usr.bin/svn/svnmucc/Makefile
+++ b/usr.bin/svn/svnmucc/Makefile
@@ -42,6 +42,4 @@ DPADD= ${LIBSVN_CLIENT} ${LIBSVN_RA} ${LIBSVN_RA_LOCAL} ${LIBSVN_RA_SVN} \
${LIBAPR_UTIL} ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE} ${LIBZ} \
${LIBCRYPT} ${LIBMAGIC} ${LIBCRYPTO} ${LIBSSL} ${LIBPTHREAD}
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.bin/svn/svnrdump/Makefile b/usr.bin/svn/svnrdump/Makefile
index 8a6a8fd..afeae00 100644
--- a/usr.bin/svn/svnrdump/Makefile
+++ b/usr.bin/svn/svnrdump/Makefile
@@ -45,6 +45,4 @@ DPADD= ${LIBSVN_CLIENT} ${LIBSVN_WC} ${LIBSVN_RA} ${LIBSVN_RA_LOCAL} \
${LIBBSDXML} ${LIBAPR} ${LIBSQLITE} ${LIBZ} ${LIBCRYPT} ${LIBMAGIC} \
${LIBCRYPTO} ${LIBSSL} ${LIBPTHREAD}
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.bin/svn/svnserve/Makefile b/usr.bin/svn/svnserve/Makefile
index d21883c..f1fa314 100644
--- a/usr.bin/svn/svnserve/Makefile
+++ b/usr.bin/svn/svnserve/Makefile
@@ -41,6 +41,4 @@ DPADD= ${LIBSVN_RA} ${LIBSVN_RA_LOCAL} ${LIBSVN_RA_SVN} ${LIBSVN_RA_SERF} \
${LIBBSDXML} ${LIBAPR} ${LIBSQLITE} ${LIBZ} ${LIBCRYPT} ${LIBMAGIC} \
${LIBCRYPTO} ${LIBSSL} ${LIBPTHREAD}
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.bin/svn/svnsync/Makefile b/usr.bin/svn/svnsync/Makefile
index db479c4..a8cd380 100644
--- a/usr.bin/svn/svnsync/Makefile
+++ b/usr.bin/svn/svnsync/Makefile
@@ -41,6 +41,4 @@ DPADD= ${LIBSVN_RA} ${LIBSVN_RA_LOCAL} ${LIBSVN_RA_SVN} ${LIBSVN_RA_SERF} \
${LIBBSDXML} ${LIBAPR} ${LIBSQLITE} ${LIBZ} ${LIBCRYPT} ${LIBMAGIC} \
${LIBCRYPTO} ${LIBSSL} ${LIBPTHREAD}
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.bin/svn/svnversion/Makefile b/usr.bin/svn/svnversion/Makefile
index 54ce13c..ca28ec3 100644
--- a/usr.bin/svn/svnversion/Makefile
+++ b/usr.bin/svn/svnversion/Makefile
@@ -32,6 +32,4 @@ DPADD= ${LIBSVN_WC} ${LIBSVN_DELTA} ${LIBSVN_DIFF} ${LIBSVN_SUBR} \
${LIBSERF} ${LIBAPR_UTIL} ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE} \
${LIBZ} ${LIBCRYPT}
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.bin/telnet/Makefile b/usr.bin/telnet/Makefile
index a683f0a..b88f8e1 100644
--- a/usr.bin/telnet/Makefile
+++ b/usr.bin/telnet/Makefile
@@ -13,8 +13,6 @@ SRCS= commands.c main.c network.c ring.c sys_bsd.c \
CFLAGS+= -DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK -DOPIE \
-I${TELNETDIR} -I${TELNETDIR}/libtelnet/
-NO_PIE= yes
-
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
.endif
diff --git a/usr.bin/vacation/Makefile b/usr.bin/vacation/Makefile
index 4f8690c..056f576 100644
--- a/usr.bin/vacation/Makefile
+++ b/usr.bin/vacation/Makefile
@@ -32,8 +32,6 @@ 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
OpenPOWER on IntegriCloud