diff mbox

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

Message ID 1396401134-21858-2-git-send-email-gregory.0xf0@gmail.com
State Accepted
Commit 85891447211add633243af01e960762c9a57b435
Headers show

Commit Message

Gregory Fong April 2, 2014, 1:12 a.m. UTC
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@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(-)

Comments

Bernhard Reutner-Fischer April 4, 2014, 2:17 p.m. UTC | #1
On Tue, Apr 01, 2014 at 06:12:13PM -0700, Gregory Fong wrote:
> 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@gmail.com>
> ---
> 
> This is a bit clunky, anyone know how to better handle this?

Applied a slightly adjusted variant, please check.
Thanks!
Gregory Fong April 4, 2014, 10:12 p.m. UTC | #2
On Fri, Apr 4, 2014 at 7:17 AM, Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com> wrote:
> On Tue, Apr 01, 2014 at 06:12:13PM -0700, Gregory Fong wrote:
>> 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@gmail.com>
>> ---
>>
>> This is a bit clunky, anyone know how to better handle this?
>
> Applied a slightly adjusted variant, please check.

Looks good to me.

Tangentially, has anyone else noticed that the uClibc cgit doesn't
show the most recent history when you go to
http://git.uclibc.org/uClibc/ and click "log" at the top or select
master under "Branch"?
Bernhard Reutner-Fischer April 5, 2014, 11:04 p.m. UTC | #3
On Fri, Apr 04, 2014 at 03:12:15PM -0700, Gregory Fong wrote:
 
> Tangentially, has anyone else noticed that the uClibc cgit doesn't
> show the most recent history when you go to
> http://git.uclibc.org/uClibc/ and click "log" at the top or select
> master under "Branch"?

Yes, buildroot thought it was due to caching but we turned that off ATM
and the bug still is exposed, so sounds like a cgit thing..
diff mbox

Patch

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