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 17 Dec 2016 19:31:56 -0000 @@ -0,0 +1,24 @@ +# $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. + +# 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: 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 17 Dec 2016 19:31:56 -0000 @@ -21,4 +21,6 @@ CPPFLAGS+=-D_KMEMUSER LDADD+=-lutil DPADD+=${LIBUTIL} +.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 17 Dec 2016 19:31:56 -0000 @@ -28,4 +28,6 @@ RUMPSRCS+= if_indextoname.c getifaddrs.c CPPFLAGS+= -DINET6 .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 17 Dec 2016 19:31:56 -0000 @@ -11,4 +11,6 @@ DPADD= ${LIBUTIL} ${LIBKVM} CWARNFLAGS.clang+= -Wno-format-extra-args CPPFLAGS+= -D_KMEMUSER +.include "../../compat/exec.mk" + .include 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 17 Dec 2016 19:31:56 -0000 @@ -9,4 +9,6 @@ MAN= savecore.8 LDADD= -lkvm -lutil -lz DPADD= ${LIBKVM} ${LIBUTIL} ${LIBZ} +.include "../../compat/exec.mk" + .include