xref: /netbsd-src/compat/exec.mk (revision af3f411dceb867f6f11e02cb925d37c0a666073b)
1*af3f411dSriastradh#	$NetBSD: exec.mk,v 1.7 2023/05/13 10:56:08 riastradh Exp $
20537635dSmrg
30537635dSmrg# this makefile fragment can be included to modify the default
40537635dSmrg# ABI a program is compiled with.  this is designed to be used
50537635dSmrg# by tools that must match the kernel image like savecore(8)
60537635dSmrg# and kvm(3) using tools.
70537635dSmrg
80537635dSmrg# currently this file is used by these Makefiles:
90537635dSmrg#
1076c08b0fSsimonb#   external/bsd/ipf/Makefile.inc
110537635dSmrg#   sbin/savecore/Makefile
120537635dSmrg#   usr.bin/fstat/Makefile
130537635dSmrg#   usr.bin/netstat/Makefile
140537635dSmrg#   usr.bin/pmap/Makefile
150537635dSmrg#   usr.bin/systat/Makefile
161383c0c7Smrg#   usr.bin/vmstat/Makefile
170537635dSmrg#   usr.sbin/crash/Makefile
180537635dSmrg#   usr.sbin/kgmon/Makefile
190537635dSmrg#   usr.sbin/pstat/Makefile
200537635dSmrg#   usr.sbin/trpt/Makefile
210537635dSmrg#
220537635dSmrg# of these, savecore, crash and kgmon are the only ones that
230537635dSmrg# can be considered "not a bug".  all the *stat tools should
240537635dSmrg# be converted to use sysctl(3) on the running kernel, and
250537635dSmrg# anyone who needs kvm-access on crash dumps can build their
2676c08b0fSsimonb# own 64 bit version as necessary.  ipfilter doesn't use
2776c08b0fSsimonb# 64-bit alignment/size safe structures.
2876c08b0fSsimonb#
290537635dSmrg
300537635dSmrg# mips64 defaults to 32 bit userland, but with a 64 bit kernel
310537635dSmrg# most kvm-using tools are happier with 64 bit.
320537635dSmrg
336135589eSmacallan.if ${MACHINE_ARCH} == "mips64el" || (${MACHINE_ARCH} == "mips64eb" && ${MACHINE} != "sgimips")
340537635dSmrg
350537635dSmrg# XXX -pie makes n64 crash
360537635dSmrgNOPIE=1
370537635dSmrg
380537635dSmrg. include <bsd.own.mk>
390537635dSmrg
407af73afeSskrll. if ${MKCOMPAT} != "no" && !defined(CRUNCHEDPROG)
410537635dSmrg.  include "${.PARSEDIR}/mips64/64/bsd.64.mk"
420537635dSmrg. endif # ${MKCOMPAT} != "no"
430537635dSmrg
440537635dSmrg.endif # mips64
45