freebsd-dev/usr.bin/clang
Ed Maste bcf99d2d99 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.

Discussed with:	dim
Reviewed by:	kib
MFC after:	1 month
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D18423
2019-02-15 22:22:38 +00:00
..
bugpoint Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
clang Regenerate clang.1. 2018-08-02 19:19:53 +00:00
clang-format DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
clang-tblgen First step in updating llvm/clang build glue: make only the clang 2017-12-21 21:24:52 +00:00
llc Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
lld lld: add -z interpose support 2018-09-14 15:15:16 +00:00
lldb DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
lli Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-ar Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-as Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-bcanalyzer Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-cov Merge ^/head r340235 through r340367. 2018-11-12 16:41:41 +00:00
llvm-cxxdump Minimize library dependencies for some llvm tools. 2017-12-24 12:42:30 +00:00
llvm-cxxfilt Minimize library dependencies for some llvm tools. 2017-12-24 12:42:30 +00:00
llvm-diff Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-dis Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-dwarfdump Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-extract Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-link Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-lto DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
llvm-lto2 DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
llvm-mc DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
llvm-mca Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-modextract Minimize library dependencies for some llvm tools. 2017-12-24 12:42:30 +00:00
llvm-nm Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-objcopy Update build blue to make WITH_CLANG_EXTRAS and WITH_CLANG_FULL work. 2018-08-01 20:46:06 +00:00
llvm-objdump llvm-objdump.1: remove more unintentional options 2018-11-27 13:52:51 +00:00
llvm-pdbutil Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-profdata Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-rtdyld DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
llvm-symbolizer Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-tblgen Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
llvm-xray Update build blue to make WITH_CLANG_EXTRAS and WITH_CLANG_FULL work. 2018-08-01 20:46:06 +00:00
opt Update llvm tool manpages, and llvm-mca.1. 2018-08-02 19:11:56 +00:00
clang.prog.mk Fix packaging for clang, lldb and lld 3.9.0 2016-11-28 20:13:56 +00:00
llvm.prog.mk Fix packaging for clang, lldb and lld 3.9.0 2016-11-28 20:13:56 +00:00
Makefile Merge ^/head r340235 through r340367. 2018-11-12 16:41:41 +00:00
Makefile.inc Add WITH_PIE knob to build Position Independent Executables 2019-02-15 22:22:38 +00:00