File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # $NetBSD: bsd.prog.mk,v 1.363 2026/02/14 08:12:27 skrll Exp $
1+ # $NetBSD: bsd.prog.mk,v 1.364 2026/02/14 16:07:25 riastradh Exp $
22# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
33
44.ifndef HOSTPROG
@@ -38,7 +38,7 @@ CLEANFILES+= a.out [Ee]rrs mklog core *.core .gdbinit
3838.if defined(MKPIE) && (${MKPIE} != "no") && !defined(NOPIE)
3939CFLAGS+ = ${PIE_CFLAGS}
4040AFLAGS+ = ${PIE_AFLAGS}
41- LDFLAGS+ = ${"${LDSTATIC.${.TARGET}}" == "-static" :? : ${PIE_LDFLAGS} }
41+ # PIE_LDFLAGS added on a per-PROG basis below depending on LDSTATIC.${PROG }
4242.endif
4343
4444CFLAGS+ = ${COPTS}
@@ -470,6 +470,9 @@ PAXCTL_FLAGS.${_P}= +a
470470_DPADD.${_P} = ${DPADD} ${DPADD.${_P}}
471471_LDADD.${_P} = ${LDADD} ${LDADD.${_P}}
472472_LDFLAGS.${_P} = ${LDFLAGS} ${LDFLAGS.${_P}}
473+ .if defined(MKPIE) && (${MKPIE} != "no") && !defined(NOPIE)
474+ _LDFLAGS.${_P}+ = ${"${LDSTATIC.${_P}}" == "-static" :? : ${PIE_LDFLAGS}}
475+ .endif
473476.if ${MKSANITIZER} != "yes"
474477# Sanitizers don't support static build.
475478_LDSTATIC.${_P} = ${LDSTATIC} ${LDSTATIC.${_P}}
You can’t perform that action at this time.
0 commit comments