xref: /freebsd-src/lib/libc/tests/stdlib/Makefile (revision c0946aee5b2ab6c9bb2e8281a1f625914ed2fec8)
1b585cd3eSKonstantin Belousov.include <src.opts.mk>
2b585cd3eSKonstantin Belousov
3597b0267SMariusz ZaborskiATF_TESTS_C+=		clearenv_test
49303f819SKyle EvansATF_TESTS_C+=		dynthr_test
598682851SEnji CooperATF_TESTS_C+=		heapsort_test
65132e16eSMark JohnstonATF_TESTS_C+=		libc_exit_test
798682851SEnji CooperATF_TESTS_C+=		mergesort_test
898682851SEnji CooperATF_TESTS_C+=		qsort_test
9ab929323SJohn Baldwin.if ${COMPILER_TYPE} == "clang"
10c65e42dbSXin LIATF_TESTS_C+=		qsort_b_test
11ab929323SJohn Baldwin.endif
12af3c7888SEd SchoutenATF_TESTS_C+=		qsort_r_compat_test
136507380fSEdward Tomasz NapieralaATF_TESTS_C+=		qsort_r_test
140d2fabfcSEdward Tomasz NapieralaATF_TESTS_C+=		qsort_s_test
159851b340SKonstantin BelousovATF_TESTS_C+=		set_constraint_handler_s_test
168c1c50ffSConrad MeyerATF_TESTS_C+=		strfmon_test
17459d04a5SEd SchoutenATF_TESTS_C+=		tsearch_test
18b585cd3eSKonstantin BelousovATF_TESTS_CXX+=		cxa_thread_atexit_test
19b585cd3eSKonstantin BelousovATF_TESTS_CXX+=		cxa_thread_atexit_nothr_test
202f121787SEnji Cooper
2124612bfdSLi-Wen Hsu# All architectures on FreeBSD have fenv.h
2224612bfdSLi-Wen HsuCFLAGS+=	-D__HAVE_FENV
2324612bfdSLi-Wen Hsu
242d143336SMitchell Horne# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater
252d143336SMitchell Horne# precision than their double.
269527fa4fSEnji Cooper.if ${MACHINE_CPUARCH} == "aarch64" || \
279527fa4fSEnji Cooper    ${MACHINE_CPUARCH} == "amd64" || \
282d143336SMitchell Horne    ${MACHINE_CPUARCH} == "i386" || \
292d143336SMitchell Horne    ${MACHINE_CPUARCH} == "riscv"
309527fa4fSEnji CooperCFLAGS+=	-D__HAVE_LONG_DOUBLE
319527fa4fSEnji Cooper.endif
329527fa4fSEnji Cooper
33640235e2SEnji Cooper# TODO: t_getenv_thread, t_mi_vector_hash, t_strtoi
3498682851SEnji CooperNETBSD_ATF_TESTS_C+=	abs_test
352f121787SEnji CooperNETBSD_ATF_TESTS_C+=	atoi_test
362f121787SEnji CooperNETBSD_ATF_TESTS_C+=	div_test
372f121787SEnji CooperNETBSD_ATF_TESTS_C+=	getenv_test
382f121787SEnji CooperNETBSD_ATF_TESTS_C+=	exit_test
392f121787SEnji CooperNETBSD_ATF_TESTS_C+=	hsearch_test
402f121787SEnji CooperNETBSD_ATF_TESTS_C+=	posix_memalign_test
412f121787SEnji CooperNETBSD_ATF_TESTS_C+=	random_test
422f121787SEnji CooperNETBSD_ATF_TESTS_C+=	strtod_test
432f121787SEnji CooperNETBSD_ATF_TESTS_C+=	strtol_test
442f121787SEnji CooperNETBSD_ATF_TESTS_C+=	system_test
452f121787SEnji Cooper
462f121787SEnji Cooper# TODO: need to come up with a correct explanation of what the patch pho does
472f121787SEnji Cooper# with h_atexit
482f121787SEnji Cooper#ATF_TESTS_SH=	atexit_test
492f121787SEnji CooperNETBSD_ATF_TESTS_SH=	getopt_test
502f121787SEnji Cooper
512f121787SEnji Cooper.include "../Makefile.netbsd-tests"
522f121787SEnji Cooper
532f121787SEnji CooperBINDIR=		${TESTSDIR}
542f121787SEnji Cooper
552f121787SEnji Cooper# TODO: see comment above
562f121787SEnji Cooper#PROGS+=		h_atexit
572f121787SEnji CooperPROGS+=		h_getopt h_getopt_long
582f121787SEnji Cooper
5998682851SEnji CooperCFLAGS+=	-I${.CURDIR}
6098682851SEnji Cooper
610eb97ccaSEnji CooperCXXSTD.cxa_thread_atexit_test=	c++11
620eb97ccaSEnji CooperCXXSTD.cxa_thread_atexit_nothr_test=	c++11
63b585cd3eSKonstantin BelousovLIBADD.cxa_thread_atexit_test+=		pthread
64b585cd3eSKonstantin Belousov
65c65e42dbSXin LI# Tests that requires Blocks feature
66c65e42dbSXin LI.for t in qsort_b_test
67c65e42dbSXin LICFLAGS.${t}.c+=		-fblocks
68c65e42dbSXin LILIBADD.${t}+=		BlocksRuntime
69c65e42dbSXin LI.endfor
70c65e42dbSXin LI
712f121787SEnji Cooper.for t in h_getopt h_getopt_long
722f121787SEnji CooperCFLAGS.$t+=	-I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests
732f121787SEnji CooperLDFLAGS.$t+=	-L${LIBNETBSD_OBJDIR}
742f121787SEnji Cooper
75eacae6dcSBryan DreweryLIBADD.${t}+=	netbsd util
762f121787SEnji Cooper.endfor
772f121787SEnji Cooper
78*c0946aeeSMark JohnstonLIBADD.libc_exit_test+=		pthread
79eacae6dcSBryan DreweryLIBADD.strtod_test+=		m
802f121787SEnji Cooper
819303f819SKyle EvansSUBDIR+=	dynthr_mod
829303f819SKyle Evans
832f121787SEnji Cooper.include <bsd.test.mk>
84