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
This commit is contained in:
bdrewery 2014-08-19 15:04:32 +00:00
parent df507d9310
commit b619f0c747
151 changed files with 5 additions and 313 deletions

View File

@ -246,7 +246,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \
DESTDIR= \
BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= MK_PIE=no \
SSP_CFLAGS= \
MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
@ -258,7 +258,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
DESTDIR= \
BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= MK_PIE=no \
SSP_CFLAGS= \
-DNO_LINT \
-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no MK_CLANG_FULL=no MK_LLDB=no MK_TESTS=no
@ -276,7 +276,7 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \
${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \
DESTDIR= \
BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= MK_PIE=no \
SSP_CFLAGS= \
MK_HTML=no MK_INFO=no -DNO_LINT MK_MAN=no \
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no
@ -1426,7 +1426,7 @@ NXBMAKE= ${NXBENV} ${MAKE} \
CLANG_TBLGEN=${OBJTREE}/nxb-bin/usr/bin/clang-tblgen \
MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \
MK_GDB=no MK_TESTS=no \
SSP_CFLAGS= MK_PIE=no \
SSP_CFLAGS= \
MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \

View File

@ -14,8 +14,6 @@ MAN= rmail.8
WARNS?= 2
CFLAGS+=-I${SENDMAIL_DIR}/include -I.
NO_PIE= yes
LIBSMDIR= ${.OBJDIR}/../../lib/libsm
LIBSM= ${LIBSMDIR}/libsm.a

View File

@ -14,6 +14,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a
DPADD+= ${RELTOP}/libiberty/libiberty.a
LDADD= ${DPADD}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -15,6 +15,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a
DPADD+= ${RELTOP}/libiberty/libiberty.a
LDADD= ${DPADD}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -14,6 +14,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a
DPADD+= ${RELTOP}/libiberty/libiberty.a
LDADD= ${DPADD}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -16,6 +16,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a
DPADD+= ${RELTOP}/libiberty/libiberty.a
LDADD= ${DPADD}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -17,6 +17,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a
DPADD+= ${RELTOP}/libiberty/libiberty.a
LDADD= ${DPADD}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -14,6 +14,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a
DPADD+= ${RELTOP}/libiberty/libiberty.a
LDADD= ${DPADD}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -14,6 +14,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a
DPADD+= ${RELTOP}/libiberty/libiberty.a
LDADD= ${DPADD}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -15,6 +15,4 @@ DPADD+= ${RELTOP}/libiberty/libiberty.a
LDADD= ${DPADD}
INSTALLFLAGS= -S
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -14,7 +14,5 @@ LDFLAGS+= -Wl,-E
DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} ${LIBGNUREGEX}
LDADD= ${GDBLIBS} ${BULIBS} -lm ${LDREADLINE} -ltermcapw -lgnuregex
NO_PIE= yes
.include <bsd.prog.mk>
CFLAGS+= -DDEBUGDIR=\"${DEBUGDIR}\"

View File

@ -15,6 +15,4 @@ LDFLAGS+= -Wl,-E
DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} ${LIBGNUREGEX}
LDADD= ${GDBLIBS} ${BULIBS} -lm ${LDREADLINE} -ltermcapw -lgnuregex
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -17,6 +17,4 @@ LDADD= ${GDBLIBS} ${BULIBS} -lkvm${GDB_SUFFIX} -lm ${LDREADLINE} -ltermcapw \
CFLAGS+= -Wl,-export-dynamic
.endif
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM}
LDADD= ${LIBDRIVER} ${LIBGROFF} -lm
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM}
LDADD= ${LIBDRIVER} ${LIBGROFF} -lm
MAN=
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM}
LDADD= ${LIBDRIVER} ${LIBGROFF} -lm
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -7,6 +7,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM}
LDADD= ${LIBDRIVER} ${LIBGROFF} -lm
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM}
LDADD= ${LIBDRIVER} ${LIBGROFF} -lm
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM}
LDADD= ${LIBDRIVER} ${LIBGROFF} -lm
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -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>

View File

@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM}
LDADD= ${LIBGROFF} -lm
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -6,6 +6,4 @@ DPADD= ${LIBGROFF}
LDADD= ${LIBGROFF}
MAN=
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -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>

View File

@ -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>

View File

@ -6,6 +6,4 @@ DPADD= ${LIBGROFF}
LDADD= ${LIBGROFF}
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM}
LDADD= ${LIBGROFF} -lm
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM}
LDADD= ${LIBGROFF} -lm
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -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

View File

@ -6,6 +6,4 @@ DPADD= ${LIBGROFF}
LDADD= ${LIBGROFF}
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM}
LDADD= ${LIBGROFF} -lm
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -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/

View File

@ -6,6 +6,4 @@ DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM}
LDADD= ${LIBBIB} ${LIBGROFF} -lm
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -6,6 +6,4 @@ DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM}
LDADD= ${LIBBIB} ${LIBGROFF} -lm
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM}
LDADD= ${LIBGROFF} -lm
CLEANFILES= ${MAN}
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -1,4 +1,3 @@
# $FreeBSD$
LIBRCS= ${.OBJDIR}/../lib/librcs.a
NO_PIE= yes

View File

@ -13,8 +13,6 @@ CFLAGS+= -DINFODIR=\"${INFODIR}:/usr/local/info:.\"
DPADD= ${LIBTERMCAPW} ${LIBTXI}
LDADD= -ltermcapw ${LIBTXI}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${TXIDIR}/info ${TXIDIR}/doc

View File

@ -6,8 +6,6 @@ SRCS= infokey.c key.c
DPADD= ${LIBTXI}
LDADD= ${LIBTXI}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${TXIDIR}/info ${TXIDIR}/doc

View File

@ -5,8 +5,6 @@ PROG= install-info
DPADD= ${LIBTXI}
LDADD= ${LIBTXI}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${TXIDIR}/util ${TXIDIR}/doc

View File

@ -8,8 +8,6 @@ SRCS= cmds.c defun.c files.c float.c footnote.c html.c \
DPADD= ${LIBTXI}
LDADD= ${LIBTXI}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: $(TXIDIR)/makeinfo $(TXIDIR)/doc

View File

@ -5,8 +5,6 @@ PROG= texindex
DPADD= ${LIBTXI}
LDADD= ${LIBTXI}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${TXIDIR}/util ${TXIDIR}/doc

View File

@ -14,8 +14,6 @@ LDADD= -lhdb -lkdc ${LDHEIMIPCS} -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \
${LIBVERS} -lheimntlm
USEPRIVATELIB= heimipcs
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kdc

View File

@ -16,8 +16,6 @@ LDADD= -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \
-lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD}
LDFLAGS=${LDAPLDFLAGS}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kdc

View File

@ -10,8 +10,6 @@ LDADD= -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \
-lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD}
LDFLAGS=${LDAPLDFLAGS}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kdc

View File

@ -11,8 +11,6 @@ LDADD= -lkadm5srv -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \
-lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD}
LDFLAGS=${LDAPLDFLAGS}
NO_PIE= yes
foo::
echo ${LIBHX509}

View File

@ -11,8 +11,6 @@ LDADD= -lkadm5srv -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \
-lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD}
LDFLAGS=${LDAPLDFLAGS}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/lib/kadm5

View File

@ -15,8 +15,6 @@ LDADD= -lkadm5srv -lgssapi -lhdb -lkrb5 -lroken \
-lasn1 ${LIBVERS} -lcrypto -lcrypt ${LDAPLDADD}
LDFLAGS=${LDAPLDFLAGS}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kadmin

View File

@ -26,8 +26,6 @@ LDADD= -lhdb -lkrb5 -lroken -lasn1 -lheimntlm ${LDHEIMIPCS} \
USEPRIVATELIB= heimipcs
LDFLAGS=${LDAPLDFLAGS}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kcm

View File

@ -14,8 +14,6 @@ DPADD= ${LIBKDC} ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} \
${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS}
LDADD= -lkdc -lhdb -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kdc

View File

@ -13,8 +13,6 @@ SRCS= kdigest.c \
kdigest-commands.c \
kdigest-commands.h
NO_PIE= yes
kdigest-commands.h: kdigest-commands.in
${SLC} ${.ALLSRC:M*.in}

View File

@ -9,8 +9,6 @@ DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \
LDADD= -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \
${LIBVERS}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/appl/kf

View File

@ -11,8 +11,6 @@ DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHEIMNTLM} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO}
LDADD= -lkafs5 -lkrb5 -lheimntlm -lroken -lasn1 -lcrypto -lcrypt \
${LIBVERS}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kuser

View File

@ -9,8 +9,6 @@ LDADD= -lkadm5srv -lhdb -lkrb5 -lhx509 -lroken ${LIBVERS} \
-lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD}
LDFLAGS=${LDAPLDFLAGS}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kpasswd

View File

@ -27,8 +27,6 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/asn1 -I.
CLEANFILES= roken.h lex.c parse.c
NO_PIE= yes
roken.h:
make-roken > ${.TARGET}

View File

@ -14,8 +14,6 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/sl -I${KRB5DIR}/lib/vers -I.
CLEANFILES= roken.h slc-gram.c slc-lex.c
NO_PIE= yes
roken.h:
${MAKE_ROKEN} > ${.TARGET}

View File

@ -10,8 +10,6 @@ DPADD= ${LIBHX509} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBSL} ${LI
LDADD= -lhx509 -lroken -lasn1 -lcrypto -lcrypt ${LIBSL} ${LIBVERS} -ledit
SRCS= hxtool.c hxtool-commands.c hxtool-commands.h
NO_PIE= yes
hxtool-commands.h: hxtool-commands.in
${SLC} ${.ALLSRC:M*.in}

View File

@ -36,8 +36,6 @@ LDADD= -lkadm5clnt -lkadm5srv -lhdb -lkrb5 -lhx509 \
-ledit -lncursesw ${LDAPLDADD}
LDFLAGS=${LDAPLDFLAGS}
NO_PIE= yes
.include <bsd.prog.mk>
kadmin-commands.h: ${KRB5DIR}/kadmin/kadmin-commands.in

View File

@ -19,8 +19,6 @@ SRCS= kcc.c \
kswitch.c \
copy_cred_cache.c
NO_PIE= yes
kcc-commands.h: kcc-commands.in
${SLC} ${.ALLSRC:M*.in}

View File

@ -8,8 +8,6 @@ LDADD= -lkafs5 -lkrb5 -lheimntlm -lroken ${LIBVERS} \
-lasn1 -lcrypto -lcrypt
MAN= kdestroy.1
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kuser

View File

@ -9,8 +9,6 @@ DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \
LDADD= -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \
${LIBVERS}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/appl/kf

View File

@ -6,8 +6,6 @@ CFLAGS+= -I${KRB5DIR}/lib/asn1 \
DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS}
LDADD= -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kuser

View File

@ -7,8 +7,6 @@ DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHEIMNTLM} ${LIBROKEN} ${LIBVERS} \
LDADD= -lkafs5 -lkrb5 -lheimntlm -lroken ${LIBVERS} \
-lasn1 -lcrypto -lcrypt -lcom_err
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kuser

View File

@ -7,8 +7,6 @@ DPADD= ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \
LDADD= -lkrb5 -lhx509 -lroken ${LIBVERS} \
-lasn1 -lcrypto -lcrypt -lcom_err
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kpasswd

View File

@ -13,8 +13,6 @@ DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \
LDADD= -lkafs5 -lkrb5 -lhx509 -lroken ${LIBVERS} \
-lasn1 -lcrypto -lcrypt -lcom_err
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/appl/su

View File

@ -11,8 +11,6 @@ DPADD= ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \
${LIBCRYPT} ${LIBVERS}
LDADD= -lhdb -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kdc

View File

@ -8,8 +8,6 @@ DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \
LDADD= -lkafs5 -lkrb5 -lhx509 -lroken ${LIBVERS} \
-lasn1 -lcrypto -lcrypt -lcom_err
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/lib/krb5

View File

@ -13,8 +13,6 @@ DPADD= ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBASN1} ${LIBCRYPTO} \
LDADD= -lkadm5srv -lhdb -lkrb5 -lasn1 -lcrypto -lcrypt ${LIBSL} -lroken \
${LIBVERS} -ledit
NO_PIE= yes
iprop-commands.h: iprop-commands.in
${SLC} ${.ALLSRC:M*.in}

View File

@ -10,8 +10,6 @@ LDADD= -lhdb -lkrb5 -lroken ${LIBVERS} \
-lasn1 -lcrypto -lcrypt ${LDAPLDADD}
LDFLAGS=${LDAPLDFLAGS}
NO_PIE= yes
.include <bsd.prog.mk>
.PATH: ${KRB5DIR}/kdc

View File

@ -22,8 +22,6 @@ DPADD= ${LIBKADM5CLNT} ${LIBKRB5} ${LIBSL} ${LIBROKEN} ${LIBVERS} \
LDADD= -lkadm5clnt -lkrb5 ${LIBSL} -lroken ${LIBVERS} \
-lasn1 -lcrypto -lcrypt -ledit
NO_PIE= yes
.include <bsd.prog.mk>
ktutil-commands.h: ${KRB5DIR}/admin/ktutil-commands.in

View File

@ -9,8 +9,6 @@ CFLAGS+= -I${.CURDIR}/../common \
-I${.CURDIR}/../../libc/include
CFLAGS+= -fno-omit-frame-pointer
NO_PIE= yes
all: ${OBJS}
CLEANFILES= ${OBJS}

View File

@ -13,8 +13,6 @@ CFLAGS+= -I${.CURDIR}/../common \
CLEANFILES= ${FILES} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o
CLEANFILES+= crt1_c.s gcrt1_c.s Scrt1_c.s
NO_PIE= yes
# See the comment in lib/csu/common/crtbrand.c for the reason crt1_c.c is not
# directly compiled to .o files.

View File

@ -9,8 +9,6 @@ SRCS= mail.local.c
MAN= mail.local.8
CFLAGS+=-I${SENDMAIL_DIR}/include -I.
NO_PIE= yes
WARNS?= 2
WFORMAT=0

View File

@ -78,8 +78,6 @@ beforeinstall:
.PATH: ${.CURDIR}/${RTLD_ARCH}
NO_PIE= yes
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif

View File

@ -9,8 +9,6 @@ SRCS= smrsh.c
MAN= smrsh.8
CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I.
NO_PIE= yes
LIBSMDIR= ${.OBJDIR}/../../lib/libsm
LIBSM= ${LIBSMDIR}/libsm.a

View File

@ -20,8 +20,6 @@ WFORMAT?= 0
CFLAGS+= -DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS -DOLD_ENVIRON \
-DENV_HACK -DSTREAMSPTY
NO_PIE= yes
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
.endif

View File

@ -5,6 +5,4 @@ PROG= fsck
SRCS= fsck.c fsutil.c preen.c
MAN= fsck.8
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -39,6 +39,4 @@ DPADD+= ${LIBPCAP}
LDADD+= -lpcap
.endif
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -8,6 +8,4 @@ MAN= ipfstat.8
DPADD+= ${LIBCURSES}
LDADD+= -lcurses
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -32,8 +32,6 @@ CLEANFILES+= ipnat.tab.c ipnat.tab.h
CLEANFILES+= ippool_y.c ippool_l.c
CLEANFILES+= ippool.tab.c ippool.tab.h
NO_PIE= yes
ipnat_y.c: ipnat_y.y
${YACC} -b ipnat -d ${.ALLSRC}
sed -e 's/yy/ipnat_yy/g' \

View File

@ -11,8 +11,6 @@ DPSRCS+= ${GENHDRS}
CLEANFILES+= ${GENHDRS} ipmon_y.c ipmon_l.c
NO_PIE= yes
ipmon_y.c: ipmon_y.y
${YACC} -d ${.ALLSRC}
sed -e 's/yy/ipmon_yy/g' \

View File

@ -11,8 +11,6 @@ DPSRCS+= ${GENHDRS}
CLEANFILES+= ${GENHDRS} ipnat_y.c ipnat_l.c
NO_PIE= yes
ipnat_y.c: ipnat_y.y
${YACC} -d ${.ALLSRC}
sed -e 's/yy/ipnat_yy/g' \

View File

@ -10,8 +10,6 @@ DPSRCS+= ${GENHDRS}
CLEANFILES+= ${GENHDRS} ippool_y.c ippool_l.c
NO_PIE= yes
ippool_y.c: ippool_y.y
${YACC} -d ${.ALLSRC}
sed -e 's/yy/ippool_yy/g' \

View File

@ -4,8 +4,6 @@ PROG= ipresend
SRCS= ipresend.c ip.c resend.c sbpf.c sock.c 44arp.c
MAN= ipresend.1
NO_PIE= yes
.PATH: ${.CURDIR}/../../../contrib/ipfilter/ipsend
.include <bsd.prog.mk>

View File

@ -14,8 +14,6 @@ CFLAGS+= -DORDER -I.
SRCS+= util.h
CLEANFILES+= util.h
NO_PIE= yes
util.h:
ln -sf ${.CURDIR}/../../lib/libutil/libutil.h ${.TARGET}

View File

@ -68,8 +68,7 @@ __DEFAULT_NO_OPTIONS = \
CTF \
DEBUG_FILES \
INSTALL_AS_USER \
INFO \
PIE
INFO
.include <bsd.mkopt.mk>

View File

@ -11,18 +11,6 @@
CFLAGS+=${COPTS}
.endif
.if ${MK_PIE} != "no" && (!defined(NO_PIE) || ${NO_PIE} == "no")
.if !defined(RESCUE) && !defined(NO_SHARED)
CFLAGS+= -fPIE -pie
LDFLAGS+= -pie
.elif defined(NO_SHARED)
.if ${NO_SHARED} == "no" || ${NO_SHARED} == "NO"
CFLAGS+= -fPIE -pie
LDFLAGS+= -pie
.endif
.endif
.endif
.if ${MK_ASSERT_DEBUG} == "no"
CFLAGS+= -DNDEBUG
NO_WERROR=

View File

@ -22,8 +22,6 @@ BOOT2_UFS?= UFS1_AND_UFS2
#BOOT2_UFS?= UFS2_ONLY
#BOOT2_UFS?= UFS1_ONLY
NO_PIE= yes
CFLAGS= -Os \
-fomit-frame-pointer \
-mrtd \

View File

@ -5,8 +5,6 @@ INTERNALPROG=
MAN=
SRCS= btx.S
NO_PIE= yes
.if defined(BOOT_BTX_NOHANG)
BOOT_BTX_FLAGS=0x1
.else

View File

@ -5,8 +5,6 @@ INTERNALPROG=
MAN=
SRCS= btxldr.S
NO_PIE= yes
CFLAGS+=-DLOADER_ADDRESS=${LOADER_ADDRESS}
CFLAGS+=-I${.CURDIR}/../../common

View File

@ -7,6 +7,4 @@ SRCS= btxcsu.S btxsys.s btxv86.s
CFLAGS+=-I${.CURDIR}/../../common
LDFLAGS=-Wl,-r
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -8,8 +8,6 @@ PROG= ${LOADER}.sym
INTERNALPROG=
NEWVERSWHAT?= "bootstrap loader" x86
NO_PIE= yes
# architecture-specific loader code
SRCS= main.c conf.c vers.c

View File

@ -32,8 +32,6 @@
BINDIR?= /boot
INSTALLFLAGS= -b
NO_PIE= yes
LOADERS= flashboot jtagboot
FILES= ${LOADERS} ${LOADERS:S/$/.md5/}

View File

@ -36,8 +36,6 @@ PROG?= loader
NEWVERSWHAT= "BERI loader" ${MACHINE_CPUARCH}
INSTALLFLAGS= -b
NO_PIE= yes
# Architecture-specific loader code
SRCS= start.S \
main.c \

View File

@ -6,8 +6,6 @@
#CC:= gcc
#COMPILER_TYPE:= gcc
NO_PIE= yes
FILES= boot boot1 boot2
NM?= nm

View File

@ -7,6 +7,4 @@ SRCS= btxcsu.S btxsys.s btxv86.s
CFLAGS+=-I${.CURDIR}/../../../i386/common
LDFLAGS=-Wl,-r
NO_PIE= yes
.include <bsd.prog.mk>

View File

@ -8,8 +8,6 @@ PROG= ${LOADER}.sym
INTERNALPROG=
NEWVERSWHAT= "bootstrap loader" pc98
NO_PIE= yes
# architecture-specific loader code
SRCS= main.c conf.c vers.c
.PATH: ${.CURDIR}/../../i386/loader

View File

@ -7,8 +7,6 @@ FILES?= boot1
SRCS= _start.s boot1.c
CLEANFILES=${FILES} boot1.aout
NO_PIE= yes
BOOTBLOCKBASE= 0x4000
CFLAGS.clang+=-mcmodel=small

View File

@ -7,8 +7,6 @@ PROG?= loader
NEWVERSWHAT?= "bootstrap loader" sparc64
INSTALLFLAGS= -b
NO_PIE= yes
# Architecture-specific loader code
SRCS= locore.S main.c metadata.c vers.c

View File

@ -1,2 +0,0 @@
.\" $FreeBSD$
Enable building of Position-Independent Executables (PIEs).

View File

@ -19,6 +19,4 @@ SRCS= ClangASTNodesEmitter.cpp \
LIBDEPS=llvmtablegen \
llvmsupport
NO_PIE= yes
.include "../clang.prog.mk"

View File

@ -1,7 +1,5 @@
# $FreeBSD$
NO_PIE= yes
LLVM_SRCS= ${.CURDIR}/../../../contrib/llvm
.include "../../lib/clang/clang.build.mk"

Some files were not shown because too many files have changed in this diff Show More