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}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to