Home | History | Annotate | Line # | Download | only in conf
      1 # $NetBSD: ssp.mk,v 1.5 2020/02/08 07:07:07 maxv Exp $
      2 
      3 .if ${USE_SSP:Uno} == "yes"
      4 COPTS.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"
     10 COPTS.cpu.c+=		-fno-stack-protector
     11 .endif
     12 
     13 COPTS.subr_kcov.c+=		-fno-stack-protector
     14 
     15 # The following files use alloca(3) or variable array allocations.
     16 # Their full name is noted as documentation.
     17 VARSTACK= \
     18 	arch/xen/i386/gdt.c \
     19 	dev/ic/aic79xx.c \
     20 	dev/ic/aic7xxx.c \
     21 	dev/usb/xhci.c \
     22 	dev/ofw/ofw_subr.c \
     23 	kern/uipc_socket.c \
     24 	miscfs/genfs/genfs_vnops.c \
     25 	nfs/nfs_bio.c \
     26 	uvm/uvm_bio.c \
     27 	uvm/uvm_pager.c \
     28 
     29 .for __varstack in ${VARSTACK}
     30 COPTS.${__varstack:T} += -Wno-stack-protector
     31 .endfor
     32