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# For isqemu.h 11CFLAGS+= -I${TESTSRC:H}/libc/gen 12 13# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater 14# precision than their double. 15.if ${MACHINE_CPUARCH} == "aarch64" || \ 16 ${MACHINE_CPUARCH} == "amd64" || \ 17 ${MACHINE_CPUARCH} == "i386" || \ 18 ${MACHINE_CPUARCH} == "riscv" 19CFLAGS+= -D__HAVE_LONG_DOUBLE 20.endif 21 22NETBSD_ATF_TESTS_C= acos_test 23NETBSD_ATF_TESTS_C+= asin_test 24NETBSD_ATF_TESTS_C+= atan_test 25NETBSD_ATF_TESTS_C+= cbrt_test 26NETBSD_ATF_TESTS_C+= ceil_test 27NETBSD_ATF_TESTS_C+= casinh_test 28NETBSD_ATF_TESTS_C+= cos_test 29NETBSD_ATF_TESTS_C+= cosh_test 30NETBSD_ATF_TESTS_C+= erf_test 31NETBSD_ATF_TESTS_C+= exp_test 32NETBSD_ATF_TESTS_C+= fmod_test 33NETBSD_ATF_TESTS_C+= fe_round_test 34NETBSD_ATF_TESTS_C+= infinity_test 35NETBSD_ATF_TESTS_C+= ilogb_test 36NETBSD_ATF_TESTS_C+= ldexp_test 37NETBSD_ATF_TESTS_C+= log_test 38NETBSD_ATF_TESTS_C+= pow_test 39NETBSD_ATF_TESTS_C+= precision_test 40NETBSD_ATF_TESTS_C+= round_test 41NETBSD_ATF_TESTS_C+= scalbn_test 42NETBSD_ATF_TESTS_C+= sin_test 43NETBSD_ATF_TESTS_C+= sinh_test 44NETBSD_ATF_TESTS_C+= sqrt_test 45NETBSD_ATF_TESTS_C+= tan_test 46NETBSD_ATF_TESTS_C+= tanh_test 47 48TAP_TESTS_C+= cexp_test 49TAP_TESTS_C+= conj_test 50.if ${MACHINE_CPUARCH} != "aarch64" 51# Hits an assert in llvm when building for arm64: 52# https://llvm.org/bugs/show_bug.cgi?id=26081 53TAP_TESTS_C+= csqrt_test 54.endif 55ATF_TESTS_C+= ctrig_test 56TAP_TESTS_C+= exponential_test 57TAP_TESTS_C+= fenv_test 58TAP_TESTS_C+= fma_test 59TAP_TESTS_C+= fmaxmin_test 60TAP_TESTS_C+= ilogb2_test 61TAP_TESTS_C+= invtrig_test 62TAP_TESTS_C+= invctrig_test 63TAP_TESTS_C+= logarithm_test 64TAP_TESTS_C+= lrint_test 65# XXX: the testcase crashes on all platforms, but only on head 66# (bug 205451) 67#TAP_TESTS_C+= lround_test 68TAP_TESTS_C+= nan_test 69TAP_TESTS_C+= nearbyint_test 70TAP_TESTS_C+= next_test 71TAP_TESTS_C+= rem_test 72ATF_TESTS_C+= trig_test 73 74.if !empty(PROG) && !empty(TAP_TESTS_C:M${PROG}) 75CFLAGS+= -O0 76.endif 77 78CSTD= c99 79 80#COPTS+= -Wfloat-equal 81 82IGNORE_PRAGMA= 83 84SRCS.ilogb2_test= ilogb_test.c 85 86LIBADD+= m 87 88WARNS?= 1 89 90# Copied from lib/msun/Makefile 91.if ${MACHINE_CPUARCH} == "i386" 92ARCH_SUBDIR= i387 93.else 94ARCH_SUBDIR= ${MACHINE_CPUARCH} 95.endif 96 97.include "../${ARCH_SUBDIR}/Makefile.inc" 98 99# XXX: for some odd reason float.h doesn't tell the full story about what the 100# precision is. 101CFLAGS+= -DLDBL_PREC=${LDBL_PREC} 102 103CFLAGS.fe_round_test+= -D__HAVE_FENV 104 105.include <netbsd-tests.test.mk> 106 107.include <bsd.test.mk> 108