1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/lib/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
..
headers Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branch 2018-11-04 15:46:30 +00:00
include Update clang, llvm, lld, lldb, compiler-rt and libc++ version number to 2018-12-15 14:08:41 +00:00
libclang Update build glue for upstream r338536 import. 2018-08-02 19:32:32 +00:00
liblldb Update build glue to make WITH_LLDB work. 2018-08-02 16:08:16 +00:00
libllvm Merge ^/head r340235 through r340367. 2018-11-12 16:41:41 +00:00
libllvmminimal Make llvm-tblgen and clang-tblgen build. 2018-07-31 18:25:33 +00:00
clang.build.mk
clang.pre.mk
freebsd_cc_version.h Pull in r352607 from upstream llvm trunk (by Craig Topper): 2019-02-08 18:24:53 +00:00
lldb.pre.mk
llvm.build.mk Comment -DNDEBUG in head after r339436 when head was switched 2018-10-21 15:54:38 +00:00
llvm.pre.mk
Makefile
Makefile.inc Add WITH_PIE knob to build Position Independent Executables 2019-02-15 22:22:38 +00:00