xref: /netbsd-src/sys/conf/ssp.mk (revision 63aea4bd5b445e491ff0389fe27ec78b3099dba3)
1# $NetBSD: ssp.mk,v 1.1 2015/09/06 04:42:06 uebayasi Exp $
2
3.if ${USE_SSP:Uno} == "yes"
4COPTS.kern_ssp.c+=	-fno-stack-protector -D__SSP__
5.endif
6
7# for multi-cpu machines, cpu_hatch() straddles the init of
8# __stack_chk_guard, so ensure stack protection is disabled
9.if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64"
10COPTS.cpu.c+=		-fno-stack-protector
11.endif
12
13# The following files use alloca(3) or variable array allocations.
14# Their full name is noted as documentation.
15VARSTACK= \
16	arch/xen/i386/gdt.c \
17	dev/ic/aic79xx.c \
18	dev/ic/aic7xxx.c \
19	dev/ofw/ofw_subr.c \
20	kern/uipc_socket.c \
21	miscfs/genfs/genfs_vnops.c \
22	nfs/nfs_bio.c \
23	uvm/uvm_bio.c \
24	uvm/uvm_pager.c \
25
26.for __varstack in ${VARSTACK}
27COPTS.${__varstack:T} += -Wno-stack-protector
28.endfor
29