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