diff --git a/lib/clang/Makefile.inc b/lib/clang/Makefile.inc index 2dfc966726b..5a8ead5292c 100644 --- a/lib/clang/Makefile.inc +++ b/lib/clang/Makefile.inc @@ -2,7 +2,11 @@ .include 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 diff --git a/usr.bin/clang/Makefile.inc b/usr.bin/clang/Makefile.inc index 831cd56a8c2..8f812e24fcd 100644 --- a/usr.bin/clang/Makefile.inc +++ b/usr.bin/clang/Makefile.inc @@ -3,8 +3,6 @@ WARNS?= 0 .include -MK_PIE:= no # Explicit libXXX.a references - .if ${COMPILER_TYPE} == "clang" DEBUG_FILES_CFLAGS= -gline-tables-only .else