xref: /freebsd/lib/msun/tests/Makefile (revision 1e248b8346cbf585990a4da0199c6cc3b9cc2340)
1# $FreeBSD$
2
3TESTSRC=	${SRCTOP}/contrib/netbsd-tests/lib/libm
4
5# All architectures on FreeBSD have fenv.h
6CFLAGS+=	-DHAVE_FENV_H
7
8# Not sure why this isn't defined for all architectures, since most
9# have long double.
10.if ${MACHINE_CPUARCH} == "aarch64" || \
11    ${MACHINE_CPUARCH} == "amd64" || \
12    ${MACHINE_CPUARCH} == "i386"
13CFLAGS+=	-D__HAVE_LONG_DOUBLE
14.endif
15
16NETBSD_ATF_TESTS_C=	acos_test
17NETBSD_ATF_TESTS_C+=	asin_test
18NETBSD_ATF_TESTS_C+=	atan_test
19NETBSD_ATF_TESTS_C+=	cbrt_test
20NETBSD_ATF_TESTS_C+=	ceil_test
21NETBSD_ATF_TESTS_C+=	cos_test
22NETBSD_ATF_TESTS_C+=	cosh_test
23NETBSD_ATF_TESTS_C+=	erf_test
24NETBSD_ATF_TESTS_C+=	exp_test
25NETBSD_ATF_TESTS_C+=	fmod_test
26NETBSD_ATF_TESTS_C+=	infinity_test
27NETBSD_ATF_TESTS_C+=	ldexp_test
28NETBSD_ATF_TESTS_C+=	log_test
29NETBSD_ATF_TESTS_C+=	pow_test
30NETBSD_ATF_TESTS_C+=	precision_test
31NETBSD_ATF_TESTS_C+=	round_test
32NETBSD_ATF_TESTS_C+=	scalbn_test
33NETBSD_ATF_TESTS_C+=	sin_test
34NETBSD_ATF_TESTS_C+=	sinh_test
35NETBSD_ATF_TESTS_C+=	sqrt_test
36NETBSD_ATF_TESTS_C+=	tan_test
37NETBSD_ATF_TESTS_C+=	tanh_test
38
39TAP_TESTS_C+=	cexp_test
40TAP_TESTS_C+=	conj_test
41.if ${MACHINE_CPUARCH} != "aarch64"
42# Hits an assert in llvm when building for arm64:
43# https://llvm.org/bugs/show_bug.cgi?id=26081
44TAP_TESTS_C+=	csqrt_test
45.endif
46TAP_TESTS_C+=	ctrig_test
47TAP_TESTS_C+=	exponential_test
48TAP_TESTS_C+=	fenv_test
49TAP_TESTS_C+=	fma_test
50TAP_TESTS_C+=	fmaxmin_test
51TAP_TESTS_C+=	ilogb_test
52TAP_TESTS_C+=	invtrig_test
53TAP_TESTS_C+=	invctrig_test
54TAP_TESTS_C+=	logarithm_test
55TAP_TESTS_C+=	lrint_test
56# XXX: the testcase crashes on all platforms, but only on head
57# (bug 205451)
58#TAP_TESTS_C+=	lround_test
59TAP_TESTS_C+=	nan_test
60TAP_TESTS_C+=	nearbyint_test
61TAP_TESTS_C+=	next_test
62TAP_TESTS_C+=	rem_test
63TAP_TESTS_C+=	trig_test
64
65.for t in ${TAP_TESTS_C}
66CFLAGS.$t+=	-O0
67.endfor
68
69CSTD=		c99
70
71#COPTS+=	-Wfloat-equal
72
73IGNORE_PRAGMA=
74
75LIBADD+=	m
76
77# Copied from lib/msun/Makefile
78.if ${MACHINE_CPUARCH} == "i386"
79ARCH_SUBDIR= i387
80.else
81ARCH_SUBDIR= ${MACHINE_CPUARCH}
82.endif
83
84.include "../${ARCH_SUBDIR}/Makefile.inc"
85
86# XXX: for some odd reason float.h doesn't tell the full story about what the
87# precision is.
88CFLAGS+=	-DLDBL_PREC=${LDBL_PREC}
89
90.include <netbsd-tests.test.mk>
91
92.include <bsd.test.mk>
93