Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jun 2020 00:46:15 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r361713 - head/share/mk
Message-ID:  <202006020046.0520kFBJ009067@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006020046.0520kFBJ009067>