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