mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
Build clang and other llvm executables as PIE
There is no reason anymore to not build these as PIE. Unfortunately bsd.lib.mk does not allow for building _only_ PIE static libraries, so lib/clang/Makefile.inc needs a kludge to work around that issue. MFC after: 1 week
This commit is contained in:
parent
0d3b2bdbf7
commit
470f9f13de
|
@ -2,7 +2,11 @@
|
|||
.include <bsd.compiler.mk>
|
||||
|
||||
PACKAGE= clang
|
||||
MK_PIE:= no # Explicit libXXX.a references
|
||||
|
||||
# Build only PIE static libraries; bsd.lib.mk does support this directly.
|
||||
MK_PIE:= no
|
||||
CFLAGS+= ${PIEFLAG} ${SHARED_CFLAGS}
|
||||
CXXFLAGS+= ${PIEFLAG} ${SHARED_CXXFLAGS}
|
||||
|
||||
.if ${COMPILER_TYPE} == "clang"
|
||||
DEBUG_FILES_CFLAGS= -gline-tables-only
|
||||
|
|
|
@ -3,8 +3,6 @@ WARNS?= 0
|
|||
|
||||
.include <bsd.compiler.mk>
|
||||
|
||||
MK_PIE:= no # Explicit libXXX.a references
|
||||
|
||||
.if ${COMPILER_TYPE} == "clang"
|
||||
DEBUG_FILES_CFLAGS= -gline-tables-only
|
||||
.else
|
||||
|
|
Loading…
Reference in a new issue