aboutsummaryrefslogtreecommitdiff
path: root/kerberos5
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2019-09-26 16:05:57 +0000
committerEd Maste <emaste@FreeBSD.org>2019-09-26 16:05:57 +0000
commit0d5bda912521220c1a2061f9177dbaa6ff2f9c13 (patch)
tree8c596270fd97ad57f9f0c62ed513c109b16f551e /kerberos5
parentf759141fc2b2f4a87d63367919f4c4db557ddfc9 (diff)
downloadsrc-0d5bda912521220c1a2061f9177dbaa6ff2f9c13.tar.gz
src-0d5bda912521220c1a2061f9177dbaa6ff2f9c13.zip
Add WITH_PIE knob to build Position Independent Executables
MFC r344179: Add WITH_PIE knob to build Position Independent Executables Building binaries as PIE allows the executable itself to be loaded at a random address when ASLR is enabled (not just its shared libraries). With this change PIE objects have a .pieo extension and INTERNALLIB libraries libXXX_pie.a. MK_PIE is disabled for some kerberos5 tools, Clang, and Subversion, as they explicitly reference .a libraries in their Makefiles. These can be addressed on an individual basis later. MK_PIE is also disabled for rtld-elf because it is already position-independent using bespoke Makefile rules. Currently only dynamically linked binaries will be built as PIE. MFC r344181: Fix Makefile conditional after r344179 MFC r344182: Use make's :tl instead of checking "no" and "NO" MFC r344189: Fixup bsd.prog.mk after r344182 MFC r344211: wlandebug: disable PIE to fix build failure libifconfig is built as a static-only PRIVATELIB (and there is no _pie.a version) so disable PIE in libifconfig's consumer. r345489: Fix GNU objdump build under WITH_PIE Explicitly specified bare .a libraries need ${PIE_SUFFIX}. r345490: Apply WITH_PIE changes to other binutils components Followon to r345489, explicitly specified bare .a libraries need ${PIE_SUFFIX} (although these still built). r345778: Fix gdb/kgdb build under WITH_PIE Explicitly specified bare .a libraries need ${PIE_SUFFIX}. Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/stable/12/; revision=352754
Diffstat (limited to 'kerberos5')
-rw-r--r--kerberos5/tools/asn1_compile/Makefile1
-rw-r--r--kerberos5/tools/slc/Makefile1
2 files changed, 2 insertions, 0 deletions
diff --git a/kerberos5/tools/asn1_compile/Makefile b/kerberos5/tools/asn1_compile/Makefile
index 68715facfcbd..5e9cbfa5ea45 100644
--- a/kerberos5/tools/asn1_compile/Makefile
+++ b/kerberos5/tools/asn1_compile/Makefile
@@ -6,6 +6,7 @@ LIBROKEN_A= ${.OBJDIR:H:H}/lib/libroken/libroken.a
LIBADD= vers
LDADD= ${LIBROKEN_A}
DPADD= ${LIBROKEN_A}
+MK_PIE:= no
SRCS= \
asn1parse.y \
diff --git a/kerberos5/tools/slc/Makefile b/kerberos5/tools/slc/Makefile
index 34092a566443..df64d829d080 100644
--- a/kerberos5/tools/slc/Makefile
+++ b/kerberos5/tools/slc/Makefile
@@ -6,6 +6,7 @@ LIBADD= vers
LDADD= ${LIBROKEN_A}
DPADD= ${LIBROKEN_A}
MAN=
+MK_PIE:= no
SRCS= roken.h \
slc-gram.y \