diff --git a/lib/clang/Makefile.inc b/lib/clang/Makefile.inc index 2dfc966726b0..5a8ead5292c6 100644 --- a/lib/clang/Makefile.inc +++ b/lib/clang/Makefile.inc @@ -1,13 +1,17 @@ .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 .else DEBUG_FILES_CFLAGS= -g1 .endif WARNS?= 0 diff --git a/usr.bin/clang/Makefile.inc b/usr.bin/clang/Makefile.inc index 831cd56a8c25..8f812e24fcdb 100644 --- a/usr.bin/clang/Makefile.inc +++ b/usr.bin/clang/Makefile.inc @@ -1,14 +1,12 @@ WARNS?= 0 .include -MK_PIE:= no # Explicit libXXX.a references - .if ${COMPILER_TYPE} == "clang" DEBUG_FILES_CFLAGS= -gline-tables-only .else DEBUG_FILES_CFLAGS= -g1 .endif .include "../Makefile.inc"