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