# Makefile for NetBSD
#
# This makefile is constructed from a machine description:
# config machineid
# Most changes should be made in the machine description
# /sys/arch/amd64/conf/``machineid''
# after which you should do
# config machineid
# Machine generic makefile changes should be made in
# /sys/arch/amd64/conf/Makefile.amd64
# after which config should be rerun for all machines of that type.
#
# To specify debugging, add the config line: makeoptions DEBUG="-g"
# A better way is to specify -g only for a few files.
#
# makeoptions DEBUGLIST="uvm* trap if_*"
MACHINE_ARCH=x86_64
USETOOLS?= no
NEED_OWN_INSTALL_TARGET?=no
NOSANITIZER=
include <bsd.init.mk>
USE_SSP?= yes
##
## (1) port identification
##
AMD64= $S/arch/amd64
GENASSYM_CONF= ${AMD64}/amd64/genassym.cf
##
## (2) compile settings
##
DEFCOPTS= -O2 -fno-omit-frame-pointer
CPPFLAGS+= -Damd64 -Dx86_64
CFLAGS+= -mcmodel=kernel
# -mno-sse implies -mno-sse2 (etc), explicitly disable avx to be extra sure
CFLAGS+= -mno-red-zone -mno-mmx -mno-sse -mno-avx
# make absolutely sure we don't get x87 registers used as well
CFLAGS+= -msoft-float
# For gcc we might need this, but other compilers barf
# CFLAGS+= -mno-fp-ret-in-387