Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/share/mk/bsd.prog.mk,v rcsdiff: /ftp/cvs/cvsroot/src/share/mk/bsd.prog.mk,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.238 retrieving revision 1.239.2.1.2.1.2.2 diff -u -p -r1.238 -r1.239.2.1.2.1.2.2 --- src/share/mk/bsd.prog.mk 2008/10/16 14:36:42 1.238 +++ src/share/mk/bsd.prog.mk 2009/12/22 04:47:26 1.239.2.1.2.1.2.2 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prog.mk,v 1.238 2008/10/16 14:36:42 christos Exp $ +# $NetBSD: bsd.prog.mk,v 1.239.2.1.2.1.2.2 2009/12/22 04:47:26 mrg Exp $ # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 .ifndef HOSTPROG @@ -27,11 +27,6 @@ clean: cleanprog echo "source ${__gdbinit}" >> .gdbinit .endfor -cleanextra: .PHONY -.if defined(CLEANFILES) && !empty(CLEANFILES) - rm -f ${CLEANFILES} -.endif - cleanobjs: .PHONY cleanprog: .PHONY cleanobjs cleanextra @@ -53,6 +48,7 @@ CLEANFILES+=strings .if defined(MKPIE) && (${MKPIE} != "no") CFLAGS+= ${PIE_CFLAGS} +AFLAGS+= ${PIE_AFLAGS} LDFLAGS+= ${PIE_LDFLAGS} .endif @@ -320,7 +316,7 @@ ${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}} ${_P}.ro: ${OBJS.${_P}} ${DPADD} ${_MKTARGET_LINK} - ${LD} -r -dc -o ${.TARGET} ${OBJS.${_P}} + ${CC} ${LDFLAGS} -nostdlib -r -Wl,-dc -o ${.TARGET} ${OBJS.${_P}} .if defined(_PROGDEBUG.${_P}) ${_PROGDEBUG.${_P}}: ${_P} @@ -446,6 +442,9 @@ scriptsinstall:: .PHONY: scriptsinstall ##### Pull in related .mk logic +LINKSOWN?= ${BINOWN} +LINKSGRP?= ${BINGRP} +LINKSMODE?= ${BINMODE} .include .include .include @@ -454,6 +453,11 @@ scriptsinstall:: .include .include +cleanextra: .PHONY +.if defined(CLEANFILES) && !empty(CLEANFILES) + rm -f ${CLEANFILES} +.endif + ${TARGETS}: # ensure existence .endif # HOSTPROG