1#	$NetBSD: exec.mk,v 1.7 2023/05/13 10:56:08 riastradh Exp $
2
3# this makefile fragment can be included to modify the default
4# ABI a program is compiled with.  this is designed to be used
5# by tools that must match the kernel image like savecore(8)
6# and kvm(3) using tools.
7
8# currently this file is used by these Makefiles:
9#
10#   external/bsd/ipf/Makefile.inc
11#   sbin/savecore/Makefile
12#   usr.bin/fstat/Makefile
13#   usr.bin/netstat/Makefile
14#   usr.bin/pmap/Makefile
15#   usr.bin/systat/Makefile
16#   usr.bin/vmstat/Makefile
17#   usr.sbin/crash/Makefile
18#   usr.sbin/kgmon/Makefile
19#   usr.sbin/pstat/Makefile
20#   usr.sbin/trpt/Makefile
21#
22# of these, savecore, crash and kgmon are the only ones that
23# can be considered "not a bug".  all the *stat tools should
24# be converted to use sysctl(3) on the running kernel, and
25# anyone who needs kvm-access on crash dumps can build their
26# own 64 bit version as necessary.  ipfilter doesn't use
27# 64-bit alignment/size safe structures.
28#
29
30# mips64 defaults to 32 bit userland, but with a 64 bit kernel
31# most kvm-using tools are happier with 64 bit.
32
33.if ${MACHINE_ARCH} == "mips64el" || (${MACHINE_ARCH} == "mips64eb" && ${MACHINE} != "sgimips")
34
35# XXX -pie makes n64 crash
36NOPIE=1
37
38. include <bsd.own.mk>
39
40. if ${MKCOMPAT} != "no" && !defined(CRUNCHEDPROG)
41.  include "${.PARSEDIR}/mips64/64/bsd.64.mk"
42. endif # ${MKCOMPAT} != "no"
43
44.endif # mips64
45