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:
Dimitry Andric 2024-02-11 19:01:56 +01:00
parent 0d3b2bdbf7
commit 470f9f13de
2 changed files with 5 additions and 3 deletions

View file

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

View file

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