1# $FreeBSD$ 2 3.include <bsd.own.mk> 4 5NO_WERROR= 6WARNS?= 2 7 8CFLAGS.h_raw+= -fstack-protector-all -Wstack-protector 9.if ${COMPILER_TYPE} == "clang" 10CFLAGS.h_raw+= -fsanitize=bounds 11.elif ${COMPILER_TYPE} == "gcc" 12CFLAGS.h_raw+= --param ssp-buffer-size=1 13DPADD+= ${LIBSSP} 14LDADD+= -lssp 15.endif 16 17NETBSD_ATF_TESTS_SH= ssp_test 18 19BINDIR= ${TESTSDIR} 20 21PROGS= h_fgets 22PROGS+= h_gets 23PROGS+= h_getcwd 24PROGS+= h_memcpy 25PROGS+= h_memmove 26PROGS+= h_memset 27# This testcase doesn't run properly when not compiled with -fsantize=bounds 28# with clang, which is currently contingent on a compiler_rt update 29.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 30500 30PROGS+= h_raw 31.endif 32PROGS+= h_read 33PROGS+= h_readlink 34PROGS+= h_snprintf 35PROGS+= h_sprintf 36PROGS+= h_stpcpy 37PROGS+= h_stpncpy 38PROGS+= h_strcat 39PROGS+= h_strcpy 40PROGS+= h_strncat 41PROGS+= h_strncpy 42PROGS+= h_vsnprintf 43PROGS+= h_vsprintf 44 45.include "../Makefile.netbsd-tests" 46 47.include <bsd.test.mk> 48