svn commit: r361713 - head/share/mk
Ed Maste
emaste at FreeBSD.org
Tue Jun 2 00:46:16 UTC 2020
Author: emaste
Date: Tue Jun 2 00:46:15 2020
New Revision: 361713
URL: https://svnweb.freebsd.org/changeset/base/361713
Log:
bsd.prog.mk: split MK_PIE test for clarity
And a comment explaining why PIE flags are disabled for static binaries.
Modified:
head/share/mk/bsd.prog.mk
Modified: head/share/mk/bsd.prog.mk
==============================================================================
--- head/share/mk/bsd.prog.mk Tue Jun 2 00:32:36 2020 (r361712)
+++ head/share/mk/bsd.prog.mk Tue Jun 2 00:46:15 2020 (r361713)
@@ -39,10 +39,13 @@ MK_DEBUG_FILES= no
.if ${MK_BIND_NOW} != "no"
LDFLAGS+= -Wl,-znow
.endif
-.if ${MK_PIE} != "no" && (!defined(NO_SHARED) || ${NO_SHARED:tl} == "no")
+.if ${MK_PIE} != "no"
+# Static PIE is not yet supported/tested.
+.if !defined(NO_SHARED) || ${NO_SHARED:tl} == "no"
CFLAGS+= -fPIE
CXXFLAGS+= -fPIE
LDFLAGS+= -pie
+.endif
.endif
.if ${MK_RETPOLINE} != "no"
.if ${COMPILER_FEATURES:Mretpoline} && ${LINKER_FEATURES:Mretpoline}
More information about the svn-src-all
mailing list