[PATCH 2/3] test/math: Select correct ULPs for mips32/mips64

Gregory Fong gregory.0xf0 at gmail.com
Wed Apr 2 01:12:13 UTC 2014


Using TARGET_ARCH isn't sufficient when ISA can differ.  Add variable
TEST_ARCH for selecting the correct ULPs file for mips32 and mips64.

Signed-off-by: Gregory Fong <gregory.0xf0 at gmail.com>
---

This is a bit clunky, anyone know how to better handle this?

 test/math/Makefile.in | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/test/math/Makefile.in b/test/math/Makefile.in
index 0285b66..ed0a0d6 100644
--- a/test/math/Makefile.in
+++ b/test/math/Makefile.in
@@ -28,7 +28,17 @@ PERL := /usr/bin/perl
 MDEPS := $(wildcard test-*.c)
 $(MDEPS): libm-test.c
 
-libm-test.c: libm-test-ulps-$(TARGET_ARCH) libm-test.inc gen-libm-test.pl
-	$(Q)$(PERL) ./gen-libm-test.pl -u libm-test-ulps-$(TARGET_ARCH) ./libm-test.inc -o "." 2>&1 > /dev/null
+ifeq ($(TARGET_ARCH),mips)
+ifneq ($(CONFIG_MIPS_ISA_MIPS64R1)$(CONFIG_MIPS_ISA_MIPS64R2),)
+TEST_ARCH := mips64
+else
+TEST_ARCH := mips32
+endif
+else  # ($(TARGET_ARCH),mips)
+TEST_ARCH := $(TARGET_ARCH)
+endif
+
+libm-test.c: libm-test-ulps-$(TEST_ARCH) libm-test.inc gen-libm-test.pl
+	$(Q)$(PERL) ./gen-libm-test.pl -u libm-test-ulps-$(TEST_ARCH) ./libm-test.inc -o "." 2>&1 > /dev/null
 
 EXTRA_CLEAN := libm-test.c libm-test-ulps.h
-- 
1.8.3.2



More information about the uClibc mailing list