1# $OpenBSD: Makefile,v 1.6 2019/07/26 09:12:38 bluhm Exp $ 2 3GCC_BUILTINS= sprintf-1 sprintf-2 sprintf-3 stpcpy-1 stpcpy-2 strcat-1 \ 4 strcat-2 strcpy-1 strcpy-2 strncat-1 vsprintf-1 vsprintf-2 \ 5 vsprintf-3 6 7TCC= gcc 8TCFLAGS= -O2 9TCXXFLAGS= ${TCFLAGS} 10 11.for i in ${GCC_BUILTINS} 12REGRESS_TARGETS+= c-${i} 13c-${i}: 14 ${TCC} ${TCFLAGS} -o /dev/null ${i}.c 2>&1 | sed '/^\/tmp\//d;s/(\.text+0x[0-9a-f]*)//' | diff -u - ${.CURDIR}/${i}.c.exp 15.endfor 16 17generate: 18.for i in ${REGRESS_TARGETS} 19 -${TCC} ${TCFLAGS} -o /dev/null ${i:C/^c-//g}.c 2>&1 | sed '/^\/tmp\//d;s/(\.text+0x[0-9a-f]*)//' >${i:C/^c-//g}.c.exp 20.endfor 21 22.PHONY: ${REGRESS_TARGETS} generate regress 23 24NOOBJ= Yes 25 26.include <bsd.own.mk> 27 28.if ${LINKER_VERSION} == "lld" 29# llvm linker does not support gcc warnings about insecure functions 30REGRESS_EXPECTED_FAILURES= ${REGRESS_TARGETS:N*strncat*} 31.endif 32 33.if ${BUILD_GCC3:L} == "yes" 34EXP= .exp.gcc3 35.elif ${BUILD_GCC4:L} == "yes" 36EXP= .exp.gcc4 37.else 38regress: 39 @echo neither gcc3 nor gcc4 exists on ${MACHINE_ARCH} 40 @echo SKIPPED 41.endif 42 43.include <bsd.regress.mk> 44