2014-11-17 09:19:09 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2016-04-14 04:40:31 +00:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2016-02-02 22:26:49 +00:00
|
|
|
PACKAGE=tests
|
|
|
|
FILESGROUPS= TESTS
|
|
|
|
TESTSPACKAGE= ${PACKAGE}
|
2014-11-17 09:19:09 +00:00
|
|
|
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libm
|
|
|
|
|
2015-04-27 18:01:52 +00:00
|
|
|
# All architectures on FreeBSD have fenv.h
|
2014-11-17 09:19:09 +00:00
|
|
|
CFLAGS+= -DHAVE_FENV_H
|
|
|
|
|
2015-04-28 14:14:06 +00:00
|
|
|
# Not sure why this isn't defined for all architectures, since most
|
|
|
|
# have long double.
|
2015-10-31 10:16:44 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "aarch64" || \
|
|
|
|
${MACHINE_CPUARCH} == "amd64" || \
|
|
|
|
${MACHINE_CPUARCH} == "i386"
|
2014-11-17 09:19:09 +00:00
|
|
|
CFLAGS+= -D__HAVE_LONG_DOUBLE
|
|
|
|
.endif
|
|
|
|
|
|
|
|
NETBSD_ATF_TESTS_C= acos_test
|
|
|
|
NETBSD_ATF_TESTS_C+= asin_test
|
|
|
|
NETBSD_ATF_TESTS_C+= atan_test
|
|
|
|
NETBSD_ATF_TESTS_C+= cbrt_test
|
|
|
|
NETBSD_ATF_TESTS_C+= ceil_test
|
|
|
|
NETBSD_ATF_TESTS_C+= cos_test
|
|
|
|
NETBSD_ATF_TESTS_C+= cosh_test
|
|
|
|
NETBSD_ATF_TESTS_C+= erf_test
|
|
|
|
NETBSD_ATF_TESTS_C+= exp_test
|
|
|
|
NETBSD_ATF_TESTS_C+= fmod_test
|
|
|
|
NETBSD_ATF_TESTS_C+= infinity_test
|
|
|
|
NETBSD_ATF_TESTS_C+= ldexp_test
|
|
|
|
NETBSD_ATF_TESTS_C+= log_test
|
|
|
|
NETBSD_ATF_TESTS_C+= pow_test
|
|
|
|
NETBSD_ATF_TESTS_C+= precision_test
|
|
|
|
NETBSD_ATF_TESTS_C+= round_test
|
|
|
|
NETBSD_ATF_TESTS_C+= scalbn_test
|
|
|
|
NETBSD_ATF_TESTS_C+= sin_test
|
|
|
|
NETBSD_ATF_TESTS_C+= sinh_test
|
|
|
|
NETBSD_ATF_TESTS_C+= sqrt_test
|
|
|
|
NETBSD_ATF_TESTS_C+= tan_test
|
|
|
|
NETBSD_ATF_TESTS_C+= tanh_test
|
|
|
|
|
2015-12-16 09:11:11 +00:00
|
|
|
TAP_TESTS_C+= cexp_test
|
|
|
|
TAP_TESTS_C+= conj_test
|
2016-01-11 21:29:36 +00:00
|
|
|
.if ${MACHINE_CPUARCH} != "aarch64"
|
|
|
|
# Hits an assert in llvm when building for arm64:
|
|
|
|
# https://llvm.org/bugs/show_bug.cgi?id=26081
|
2015-12-16 09:11:11 +00:00
|
|
|
TAP_TESTS_C+= csqrt_test
|
2016-01-11 21:29:36 +00:00
|
|
|
.endif
|
2015-12-20 05:06:44 +00:00
|
|
|
TAP_TESTS_C+= ctrig_test
|
|
|
|
TAP_TESTS_C+= exponential_test
|
2015-12-16 09:11:11 +00:00
|
|
|
TAP_TESTS_C+= fenv_test
|
2015-12-20 05:06:44 +00:00
|
|
|
TAP_TESTS_C+= fma_test
|
2016-04-14 04:40:31 +00:00
|
|
|
# clang 3.8.0 fails always fails this test. See: bug 208703
|
|
|
|
.if ! (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} == 30800)
|
2015-12-16 09:11:11 +00:00
|
|
|
TAP_TESTS_C+= fmaxmin_test
|
2016-04-14 04:40:31 +00:00
|
|
|
.endif
|
2015-12-16 09:11:11 +00:00
|
|
|
TAP_TESTS_C+= ilogb_test
|
2015-12-20 05:06:44 +00:00
|
|
|
TAP_TESTS_C+= invtrig_test
|
2015-12-16 09:11:11 +00:00
|
|
|
TAP_TESTS_C+= invctrig_test
|
|
|
|
TAP_TESTS_C+= logarithm_test
|
|
|
|
TAP_TESTS_C+= lrint_test
|
2015-12-20 05:06:44 +00:00
|
|
|
# XXX: the testcase crashes on all platforms, but only on head
|
|
|
|
# (bug 205451)
|
|
|
|
#TAP_TESTS_C+= lround_test
|
2015-12-16 09:11:11 +00:00
|
|
|
TAP_TESTS_C+= nan_test
|
|
|
|
TAP_TESTS_C+= nearbyint_test
|
|
|
|
TAP_TESTS_C+= next_test
|
|
|
|
TAP_TESTS_C+= rem_test
|
|
|
|
TAP_TESTS_C+= trig_test
|
|
|
|
|
2016-04-11 21:15:48 +00:00
|
|
|
.if !empty(PROG) && !empty(TAP_TESTS_C:M${PROG})
|
|
|
|
CFLAGS+= -O0
|
|
|
|
.endif
|
2015-12-16 09:11:11 +00:00
|
|
|
|
2014-11-17 09:19:09 +00:00
|
|
|
CSTD= c99
|
|
|
|
|
|
|
|
#COPTS+= -Wfloat-equal
|
|
|
|
|
2015-12-16 09:11:11 +00:00
|
|
|
IGNORE_PRAGMA=
|
|
|
|
|
|
|
|
LIBADD+= m
|
|
|
|
|
2014-11-17 09:19:09 +00:00
|
|
|
# Copied from lib/msun/Makefile
|
|
|
|
.if ${MACHINE_CPUARCH} == "i386"
|
|
|
|
ARCH_SUBDIR= i387
|
|
|
|
.else
|
|
|
|
ARCH_SUBDIR= ${MACHINE_CPUARCH}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include "../${ARCH_SUBDIR}/Makefile.inc"
|
|
|
|
|
|
|
|
# XXX: for some odd reason float.h doesn't tell the full story about what the
|
|
|
|
# precision is.
|
|
|
|
CFLAGS+= -DLDBL_PREC=${LDBL_PREC}
|
|
|
|
|
|
|
|
.include <netbsd-tests.test.mk>
|
|
|
|
|
|
|
|
.include <bsd.test.mk>
|