xref: /freebsd-14.2/lib/libc/tests/stdlib/Makefile (revision b9c361e4)
12f121787SEnji Cooper
2b585cd3eSKonstantin Belousov.include <src.opts.mk>
3b585cd3eSKonstantin Belousov
4597b0267SMariusz ZaborskiATF_TESTS_C+=		clearenv_test
59303f819SKyle EvansATF_TESTS_C+=		dynthr_test
698682851SEnji CooperATF_TESTS_C+=		heapsort_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
15*b9c361e4SDag-Erling SmørgravATF_TESTS_C+=		quick_exit_test
169851b340SKonstantin BelousovATF_TESTS_C+=		set_constraint_handler_s_test
178c1c50ffSConrad MeyerATF_TESTS_C+=		strfmon_test
18459d04a5SEd SchoutenATF_TESTS_C+=		tsearch_test
19b585cd3eSKonstantin BelousovATF_TESTS_CXX+=		cxa_thread_atexit_test
20b585cd3eSKonstantin BelousovATF_TESTS_CXX+=		cxa_thread_atexit_nothr_test
212f121787SEnji Cooper
2224612bfdSLi-Wen Hsu# All architectures on FreeBSD have fenv.h
2324612bfdSLi-Wen HsuCFLAGS+=	-D__HAVE_FENV
2424612bfdSLi-Wen Hsu
252d143336SMitchell Horne# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater
262d143336SMitchell Horne# precision than their double.
279527fa4fSEnji Cooper.if ${MACHINE_CPUARCH} == "aarch64" || \
289527fa4fSEnji Cooper    ${MACHINE_CPUARCH} == "amd64" || \
292d143336SMitchell Horne    ${MACHINE_CPUARCH} == "i386" || \
302d143336SMitchell Horne    ${MACHINE_CPUARCH} == "riscv"
319527fa4fSEnji CooperCFLAGS+=	-D__HAVE_LONG_DOUBLE
329527fa4fSEnji Cooper.endif
339527fa4fSEnji Cooper
34640235e2SEnji Cooper# TODO: t_getenv_thread, t_mi_vector_hash, t_strtoi
3598682851SEnji CooperNETBSD_ATF_TESTS_C+=	abs_test
362f121787SEnji CooperNETBSD_ATF_TESTS_C+=	atoi_test
372f121787SEnji CooperNETBSD_ATF_TESTS_C+=	div_test
382f121787SEnji CooperNETBSD_ATF_TESTS_C+=	getenv_test
392f121787SEnji CooperNETBSD_ATF_TESTS_C+=	exit_test
402f121787SEnji CooperNETBSD_ATF_TESTS_C+=	hsearch_test
412f121787SEnji CooperNETBSD_ATF_TESTS_C+=	posix_memalign_test
422f121787SEnji CooperNETBSD_ATF_TESTS_C+=	random_test
432f121787SEnji CooperNETBSD_ATF_TESTS_C+=	strtod_test
442f121787SEnji CooperNETBSD_ATF_TESTS_C+=	strtol_test
452f121787SEnji CooperNETBSD_ATF_TESTS_C+=	system_test
462f121787SEnji Cooper
472f121787SEnji Cooper# TODO: need to come up with a correct explanation of what the patch pho does
482f121787SEnji Cooper# with h_atexit
492f121787SEnji Cooper#ATF_TESTS_SH=	atexit_test
502f121787SEnji CooperNETBSD_ATF_TESTS_SH=	getopt_test
512f121787SEnji Cooper
522f121787SEnji Cooper.include "../Makefile.netbsd-tests"
532f121787SEnji Cooper
542f121787SEnji CooperBINDIR=		${TESTSDIR}
552f121787SEnji Cooper
562f121787SEnji Cooper# TODO: see comment above
572f121787SEnji Cooper#PROGS+=		h_atexit
582f121787SEnji CooperPROGS+=		h_getopt h_getopt_long
592f121787SEnji Cooper
6098682851SEnji CooperCFLAGS+=	-I${.CURDIR}
6198682851SEnji Cooper
620eb97ccaSEnji CooperCXXSTD.cxa_thread_atexit_test=	c++11
630eb97ccaSEnji CooperCXXSTD.cxa_thread_atexit_nothr_test=	c++11
64b585cd3eSKonstantin BelousovLIBADD.cxa_thread_atexit_test+=		pthread
65b585cd3eSKonstantin Belousov
66c65e42dbSXin LI# Tests that requires Blocks feature
67c65e42dbSXin LI.for t in qsort_b_test
68c65e42dbSXin LICFLAGS.${t}.c+=		-fblocks
69c65e42dbSXin LILIBADD.${t}+=		BlocksRuntime
70c65e42dbSXin LI.endfor
71c65e42dbSXin LI
722f121787SEnji Cooper.for t in h_getopt h_getopt_long
732f121787SEnji CooperCFLAGS.$t+=	-I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests
742f121787SEnji CooperLDFLAGS.$t+=	-L${LIBNETBSD_OBJDIR}
752f121787SEnji Cooper
76eacae6dcSBryan DreweryLIBADD.${t}+=	netbsd util
772f121787SEnji Cooper.endfor
782f121787SEnji Cooper
79eacae6dcSBryan DreweryLIBADD.strtod_test+=		m
802f121787SEnji Cooper
819303f819SKyle EvansSUBDIR+=	dynthr_mod
829303f819SKyle Evans
832f121787SEnji Cooper.include <bsd.test.mk>
84