Index: compat/exec.mk =================================================================== RCS file: compat/exec.mk diff -N compat/exec.mk --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ compat/exec.mk 23 Dec 2016 07:37:04 -0000 @@ -0,0 +1,42 @@ +# $NetBSD$ + +# this makefile fragment can be included to modify the default +# ABI a program is compiled with. this is designed to be used +# by tools that must match the kernel image like savecore(8) +# and kvm(3) using tools. + +# currently this file is used by these Makefiles: +# +# sbin/savecore/Makefile +# usr.bin/fstat/Makefile +# usr.bin/netstat/Makefile +# usr.bin/pmap/Makefile +# usr.bin/systat/Makefile +# usr.sbin/crash/Makefile +# usr.sbin/kgmon/Makefile +# usr.sbin/pstat/Makefile +# usr.sbin/trpt/Makefile +# +# of these, savecore, crash and kgmon are the only ones that +# can be considered "not a bug". all the *stat tools should +# be converted to use sysctl(3) on the running kernel, and +# anyone who needs kvm-access on crash dumps can build their +# own 64 bit version as necessary. + +# mips64 defaults to 32 bit userland, but with a 64 bit kernel +# most kvm-using tools are happier with 64 bit. + +.if ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb" + +# XXX -pie makes n64 crash +NOPIE=1 +# XXX interesting dynamic binaries crash (hello.c works.) +LDSTATIC=-static + +. include + +. if ${MKCOMPAT} != "no" && !defined(RESCUEDIR) +. include "${.PARSEDIR}/mips64/64/bsd.64.mk" +. endif # ${MKCOMPAT} != "no" + +.endif # mips64 Index: sbin/savecore/Makefile =================================================================== RCS file: /cvsroot/src/sbin/savecore/Makefile,v retrieving revision 1.25 diff -p -u -r1.25 Makefile --- sbin/savecore/Makefile 13 Jun 2001 23:16:27 -0000 1.25 +++ sbin/savecore/Makefile 23 Dec 2016 07:37:04 -0000 @@ -9,4 +9,6 @@ MAN= savecore.8 LDADD= -lkvm -lutil -lz DPADD= ${LIBKVM} ${LIBUTIL} ${LIBZ} +.include "../../compat/exec.mk" + .include Index: usr.bin/systat/Makefile =================================================================== RCS file: /cvsroot/src/usr.bin/systat/Makefile,v retrieving revision 1.39 diff -p -u -r1.39 Makefile --- usr.bin/systat/Makefile 2 Aug 2016 15:56:09 -0000 1.39 +++ usr.bin/systat/Makefile 23 Dec 2016 07:37:04 -0000 @@ -27,4 +27,6 @@ CPPFLAGS+=-DINET6 SRCS+= ip6.c .endif +.include "../../compat/exec.mk" + .include Index: usr.bin/pmap/Makefile =================================================================== RCS file: /cvsroot/src/usr.bin/pmap/Makefile,v retrieving revision 1.7 diff -p -u -r1.7 Makefile --- usr.bin/pmap/Makefile 23 Jan 2016 21:22:49 -0000 1.7 +++ usr.bin/pmap/Makefile 23 Dec 2016 07:37:04 -0000 @@ -11,4 +11,6 @@ DPADD= ${LIBUTIL} ${LIBKVM} CWARNFLAGS.clang+= -Wno-format-extra-args CPPFLAGS+= -D_KMEMUSER +.include "../../compat/exec.mk" + .include Index: usr.bin/netstat/Makefile =================================================================== RCS file: /cvsroot/src/usr.bin/netstat/Makefile,v retrieving revision 1.43 diff -p -u -r1.43 Makefile --- usr.bin/netstat/Makefile 6 Jun 2015 13:48:37 -0000 1.43 +++ usr.bin/netstat/Makefile 23 Dec 2016 07:37:04 -0000 @@ -28,4 +28,6 @@ RUMPSRCS+= if_indextoname.c getifaddrs.c CPPFLAGS+= -DINET6 .endif +.include "../../compat/exec.mk" + .include Index: usr.bin/fstat/Makefile =================================================================== RCS file: /cvsroot/src/usr.bin/fstat/Makefile,v retrieving revision 1.24 diff -p -u -r1.24 Makefile --- usr.bin/fstat/Makefile 23 Jan 2016 16:12:03 -0000 1.24 +++ usr.bin/fstat/Makefile 23 Dec 2016 07:37:04 -0000 @@ -21,4 +21,6 @@ CPPFLAGS+=-D_KMEMUSER LDADD+=-lutil DPADD+=${LIBUTIL} +.include "../../compat/exec.mk" + .include Index: usr.sbin/pstat/Makefile =================================================================== RCS file: /cvsroot/src/usr.sbin/pstat/Makefile,v retrieving revision 1.16 diff -p -u -r1.16 Makefile --- usr.sbin/pstat/Makefile 2 Jan 2013 10:43:11 -0000 1.16 +++ usr.sbin/pstat/Makefile 23 Dec 2016 07:37:04 -0000 @@ -19,4 +19,6 @@ CPPFLAGS+=-D_KMEMUSER .PATH: ${NETBSDSRCDIR}/sbin/swapctl +.include "../../compat/exec.mk" + .include Index: usr.sbin/kgmon/Makefile =================================================================== RCS file: /cvsroot/src/usr.sbin/kgmon/Makefile,v retrieving revision 1.10 diff -p -u -r1.10 Makefile --- usr.sbin/kgmon/Makefile 22 Apr 2009 15:23:04 -0000 1.10 +++ usr.sbin/kgmon/Makefile 23 Dec 2016 07:37:04 -0000 @@ -13,4 +13,6 @@ LDADD= -lkvm #BINOWN=root #BINMODE=4555 +.include "../../compat/exec.mk" + .include Index: usr.sbin/crash/Makefile =================================================================== RCS file: /cvsroot/src/usr.sbin/crash/Makefile,v retrieving revision 1.32 diff -p -u -r1.32 Makefile --- usr.sbin/crash/Makefile 10 Dec 2016 10:42:43 -0000 1.32 +++ usr.sbin/crash/Makefile 23 Dec 2016 07:37:04 -0000 @@ -97,5 +97,7 @@ SRCS+= unsupported.c .endif # } +.include "../../compat/exec.mk" + .include .include Index: usr.sbin/trpt/Makefile =================================================================== RCS file: /cvsroot/src/usr.sbin/trpt/Makefile,v retrieving revision 1.10 diff -p -u -r1.10 Makefile --- usr.sbin/trpt/Makefile 28 May 2007 12:06:42 -0000 1.10 +++ usr.sbin/trpt/Makefile 23 Dec 2016 07:37:04 -0000 @@ -15,4 +15,6 @@ LDADD= -lkvm CPPFLAGS+= -DINET6 .endif +.include "../../compat/exec.mk" + .include