Module Name: src Committed By: martin Date: Mon Aug 19 15:53:40 UTC 2019
Modified Files: src/share/mk [netbsd-9]: bsd.prog.mk Log Message: Pull up following revision(s) (requested by kamil in ticket #93): share/mk/bsd.prog.mk: revision 1.322 Add PAXCTL_FLAG rules for MKSANITIZER Add per-program rules to disable ASLR for ASan, TSan and MSan in all sanitized programs. This flag is not needed for other supported sanitizers. Without this change, sanitized init(8) dies early on startup. Approach originally suggested by <joerg> To generate a diff of this commit: cvs rdiff -u -r1.319.2.1 -r1.319.2.2 src/share/mk/bsd.prog.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/mk/bsd.prog.mk diff -u src/share/mk/bsd.prog.mk:1.319.2.1 src/share/mk/bsd.prog.mk:1.319.2.2 --- src/share/mk/bsd.prog.mk:1.319.2.1 Fri Aug 16 19:22:08 2019 +++ src/share/mk/bsd.prog.mk Mon Aug 19 15:53:40 2019 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prog.mk,v 1.319.2.1 2019/08/16 19:22:08 martin Exp $ +# $NetBSD: bsd.prog.mk,v 1.319.2.2 2019/08/19 15:53:40 martin Exp $ # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 .ifndef HOSTPROG @@ -482,10 +482,18 @@ PROGNAME.${_P}?= ${_P} _PROGDEBUG.${_P}:= ${PROGNAME.${_P}}.debug .endif +# paxctl specific arguments + .if defined(PAXCTL_FLAGS) PAXCTL_FLAGS.${_P}?= ${PAXCTL_FLAGS} .endif +.if ${MKSANITIZER:Uno} == "yes" && \ + (${USE_SANITIZER} == "address" || ${USE_SANITIZER} == "thread" || \ + ${USE_SANITIZER} == "memory") +PAXCTL_FLAGS.${_P}= +a +.endif + ##### PROG specific flags. _DPADD.${_P}= ${DPADD} ${DPADD.${_P}}