summaryrefslogtreecommitdiff
path: root/test/math/Makefile.in
blob: 0b2680530551d78b32c29b67b1828b486ed8a892 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# uClibc-ng math tests
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.

# libm-test.c is a generated file used by the tests internally so skip it
TESTS_DISABLED := libm-test

# gamma (removed from TESTS, need to add "small errors are ok" machinery there)
TESTS_DISABLED += gamma 
TESTS_DISABLED += test-misc test-signgam-main
# disable long double tests, only for some architectures available
TESTS_DISABLED += test-ldouble test-ldouble-finite test-ildoubl compile_test c99_test
# disable tgmath tests, not implemented
TESTS_DISABLED += test-tgmath test-tgmath2 test-tgmath-int test-tgmath-ret

CFLAGS_test-signgam-finite = -ffinite-math-only
CFLAGS_test-signgam-finite-c99 = -ffinite-math-only -std=c99
CFLAGS_test-signgam-finite-c11 = -ffinite-math-only -std=c11
CFLAGS_test-signgam-uchar = -std=c99
CFLAGS_test-signgam-uchar-init = -std=c99
CFLAGS_test-signgam-uchar-static = -std=c99
CFLAGS_test-signgam-uchar-init-static = -std=c99
CFLAGS_test-signgam-uint = -std=c99
CFLAGS_test-signgam-uint-init = -std=c99
CFLAGS_test-signgam-uint-static = -std=c99
CFLAGS_test-signgam-uint-init-static = -std=c99
CFLAGS_test-signgam-ullong = -std=c99
CFLAGS_test-signgam-ullong-init = -std=c99
CFLAGS_test-signgam-ullong-static = -std=c99
CFLAGS_test-signgam-ullong-init-static = -std=c99

# NOTE: For basic-test we must disable the floating point optimization.
#       Only for sh architecture because in the other architecture are disabled.
ifeq ($(TARGET_ARCH),sh)
CFLAGS_basic-test += -mieee
endif
EXTRA_CFLAGS    := -fno-builtin -DNO_LONG_DOUBLE
EXTRA_LDFLAGS   := -lm

PERL := perl

MDEPS := $(wildcard test-*.c)
$(MDEPS): libm-test.c

ULP_SUFFIX :=
TARGET_ULP := $(if $(wildcard libm-test-ulps-$(TARGET_ARCH)$(ULP_SUFFIX)),$(TARGET_ARCH)$(ULP_SUFFIX),generic)

libm-test.c: libm-test-ulps-$(TARGET_ULP) libm-test.inc gen-libm-test.pl
	$(Q)$(PERL) ./gen-libm-test.pl -u libm-test-ulps-$(TARGET_ULP) ./libm-test.inc -o "." 2>&1 > /dev/null
	$(Q)$(SHELL) ./gen-libm-have-vector-test.sh > libm-have-vector-test.h

EXTRA_CLEAN := libm-test.c libm-test-ulps.h libm-have-vector-test.h