xref: /freebsd-14.2/lib/libc/tests/stdlib/Makefile (revision c65e42db)
12f121787SEnji Cooper# $FreeBSD$
22f121787SEnji Cooper
3b585cd3eSKonstantin Belousov.include <src.opts.mk>
4b585cd3eSKonstantin Belousov
5597b0267SMariusz ZaborskiATF_TESTS_C+=		clearenv_test
69303f819SKyle EvansATF_TESTS_C+=		dynthr_test
798682851SEnji CooperATF_TESTS_C+=		heapsort_test
898682851SEnji CooperATF_TESTS_C+=		mergesort_test
998682851SEnji CooperATF_TESTS_C+=		qsort_test
10*c65e42dbSXin LIATF_TESTS_C+=		qsort_b_test
116507380fSEdward Tomasz NapieralaATF_TESTS_C+=		qsort_r_test
120d2fabfcSEdward Tomasz NapieralaATF_TESTS_C+=		qsort_s_test
139851b340SKonstantin BelousovATF_TESTS_C+=		set_constraint_handler_s_test
148c1c50ffSConrad MeyerATF_TESTS_C+=		strfmon_test
15459d04a5SEd SchoutenATF_TESTS_C+=		tsearch_test
16b585cd3eSKonstantin BelousovATF_TESTS_CXX+=		cxa_thread_atexit_test
17b585cd3eSKonstantin BelousovATF_TESTS_CXX+=		cxa_thread_atexit_nothr_test
182f121787SEnji Cooper
1924612bfdSLi-Wen Hsu# All architectures on FreeBSD have fenv.h
2024612bfdSLi-Wen HsuCFLAGS+=	-D__HAVE_FENV
2124612bfdSLi-Wen Hsu
222d143336SMitchell Horne# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater
232d143336SMitchell Horne# precision than their double.
249527fa4fSEnji Cooper.if ${MACHINE_CPUARCH} == "aarch64" || \
259527fa4fSEnji Cooper    ${MACHINE_CPUARCH} == "amd64" || \
262d143336SMitchell Horne    ${MACHINE_CPUARCH} == "i386" || \
272d143336SMitchell Horne    ${MACHINE_CPUARCH} == "riscv"
289527fa4fSEnji CooperCFLAGS+=	-D__HAVE_LONG_DOUBLE
299527fa4fSEnji Cooper.endif
309527fa4fSEnji Cooper
31640235e2SEnji Cooper# TODO: t_getenv_thread, t_mi_vector_hash, t_strtoi
3298682851SEnji CooperNETBSD_ATF_TESTS_C+=	abs_test
332f121787SEnji CooperNETBSD_ATF_TESTS_C+=	atoi_test
342f121787SEnji CooperNETBSD_ATF_TESTS_C+=	div_test
352f121787SEnji CooperNETBSD_ATF_TESTS_C+=	getenv_test
362f121787SEnji CooperNETBSD_ATF_TESTS_C+=	exit_test
372f121787SEnji CooperNETBSD_ATF_TESTS_C+=	hsearch_test
382f121787SEnji CooperNETBSD_ATF_TESTS_C+=	posix_memalign_test
392f121787SEnji CooperNETBSD_ATF_TESTS_C+=	random_test
402f121787SEnji CooperNETBSD_ATF_TESTS_C+=	strtod_test
412f121787SEnji CooperNETBSD_ATF_TESTS_C+=	strtol_test
422f121787SEnji CooperNETBSD_ATF_TESTS_C+=	system_test
432f121787SEnji Cooper
442f121787SEnji Cooper# TODO: need to come up with a correct explanation of what the patch pho does
452f121787SEnji Cooper# with h_atexit
462f121787SEnji Cooper#ATF_TESTS_SH=	atexit_test
472f121787SEnji CooperNETBSD_ATF_TESTS_SH=	getopt_test
482f121787SEnji Cooper
492f121787SEnji Cooper.include "../Makefile.netbsd-tests"
502f121787SEnji Cooper
512f121787SEnji CooperBINDIR=		${TESTSDIR}
522f121787SEnji Cooper
532f121787SEnji Cooper# TODO: see comment above
542f121787SEnji Cooper#PROGS+=		h_atexit
552f121787SEnji CooperPROGS+=		h_getopt h_getopt_long
562f121787SEnji Cooper
5798682851SEnji CooperCFLAGS+=	-I${.CURDIR}
5898682851SEnji Cooper
590eb97ccaSEnji CooperCXXSTD.cxa_thread_atexit_test=	c++11
600eb97ccaSEnji CooperCXXSTD.cxa_thread_atexit_nothr_test=	c++11
61b585cd3eSKonstantin BelousovLIBADD.cxa_thread_atexit_test+=		pthread
62b585cd3eSKonstantin Belousov
63*c65e42dbSXin LI# Tests that requires Blocks feature
64*c65e42dbSXin LI.for t in qsort_b_test
65*c65e42dbSXin LICFLAGS.${t}.c+=		-fblocks
66*c65e42dbSXin LILIBADD.${t}+=		BlocksRuntime
67*c65e42dbSXin LI.endfor
68*c65e42dbSXin LI
692f121787SEnji Cooper.for t in h_getopt h_getopt_long
702f121787SEnji CooperCFLAGS.$t+=	-I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests
712f121787SEnji CooperLDFLAGS.$t+=	-L${LIBNETBSD_OBJDIR}
722f121787SEnji Cooper
73eacae6dcSBryan DreweryLIBADD.${t}+=	netbsd util
742f121787SEnji Cooper.endfor
752f121787SEnji Cooper
76eacae6dcSBryan DreweryLIBADD.strtod_test+=		m
772f121787SEnji Cooper
789303f819SKyle EvansSUBDIR+=	dynthr_mod
799303f819SKyle Evans
802f121787SEnji Cooper.include <bsd.test.mk>
81