3 # XXX This is a workaround to allow i386 to cross-compile on an amd64 host.
4 .include <host-target.mk>
12 CFLAGS.h_raw+= -fstack-protector-all -Wstack-protector
13 .if ${COMPILER_TYPE} == "clang"
14 CFLAGS.h_raw+= -fsanitize=bounds
15 .elif ${COMPILER_TYPE} == "gcc"
16 CFLAGS.h_raw+= --param ssp-buffer-size=1
20 NETBSD_ATF_TESTS_SH= ssp_test
30 # This testcase doesn't run properly when not compiled with -fsantize=bounds
31 # with clang, which is currently contingent on a compiler_rt update
33 # XXX: the h_raw/h_read testcases don't cause a SIGABRT with in-tree gcc right
34 # now on amd64 when it trips the stack bounds specified in t_ssp.sh . This
35 # probably needs to be fixed as it's currently hardcoded.
37 # sanitizer is not tested or supported for ARM right now. sbruno
38 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
39 .if ${COMPILER_TYPE} == "clang" && ${MK_TOOLCHAIN} == "yes"
40 .if ${COMPILER_VERSION} < 30500 || 30700 <= ${COMPILER_VERSION}
42 # XXX This is a workaround to allow i386 to cross-compile on an amd64 host.
43 .if ${MACHINE_CPUARCH} == ${_HOST_ARCH}
48 # XXX This is a workaround to allow i386 to cross-compile on an amd64 host.
68 .include "../Makefile.netbsd-tests"
70 .include <bsd.test.mk>