diff mbox

test/math: fix for MIPS that takes 32/64 suffix into account

Message ID 1406710381-7723-1-git-send-email-abrodkin@synopsys.com
State Superseded
Headers show

Commit Message

Alexey Brodkin July 30, 2014, 8:53 a.m. UTC
This fixes a breakage for MIPS32/64 introduced in:
http://git.uclibc.org/uClibc/commit/?id=c02bc5763ba9c8f8b464bca89fba28e091ce1ffc

Solution is simple - just modify TARGET_ARCH so it includes suffix already.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Cc: Waldemar Brodkorb <wbx@openadk.org>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Anton Kolesov <akolesov@synopsys.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
 test/math/Makefile.in | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Bernhard Reutner-Fischer Aug. 14, 2014, 2:49 p.m. UTC | #1
On 30 July 2014 10:53, Alexey Brodkin <Alexey.Brodkin@synopsys.com> wrote:
> This fixes a breakage for MIPS32/64 introduced in:
> http://git.uclibc.org/uClibc/commit/?id=c02bc5763ba9c8f8b464bca89fba28e091ce1ffc
>
> Solution is simple - just modify TARGET_ARCH so it includes suffix already.

Please do not modify TARGET_ARCH, use a local variable that is just used here.

TIA,
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>
> Cc: Waldemar Brodkorb <wbx@openadk.org>
> Cc: Vineet Gupta <vgupta@synopsys.com>
> Cc: Anton Kolesov <akolesov@synopsys.com>
> Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
> ---
>  test/math/Makefile.in | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/test/math/Makefile.in b/test/math/Makefile.in
> index b495c0b..b48916c 100644
> --- a/test/math/Makefile.in
> +++ b/test/math/Makefile.in
> @@ -31,12 +31,11 @@ PERL := /usr/bin/perl
>  MDEPS := $(wildcard test-*.c)
>  $(MDEPS): libm-test.c
>
> -TARGET_ULP := $(if $(wildcard libm-test-ulps-$(TARGET_ARCH)),$(TARGET_ARCH),generic)
> -ULP_SUFFIX :=
>  ifeq ($(TARGET_ARCH),mips)
> -ULP_SUFFIX:=$(if $(CONFIG_MIPS_ISA_MIPS64R1)$(CONFIG_MIPS_ISA_MIPS64R2),64,32)
> +TARGET_ARCH := $(TARGET_ARCH)$(if $(CONFIG_MIPS_ISA_MIPS64R1)$(CONFIG_MIPS_ISA_MIPS64R2),64,32)
>  endif
> -TARGET_ULP:=$(TARGET_ULP)$(ULP_SUFFIX)
> +
> +TARGET_ULP := $(if $(wildcard libm-test-ulps-$(TARGET_ARCH)),$(TARGET_ARCH),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
> --
> 1.9.3
>
diff mbox

Patch

diff --git a/test/math/Makefile.in b/test/math/Makefile.in
index b495c0b..b48916c 100644
--- a/test/math/Makefile.in
+++ b/test/math/Makefile.in
@@ -31,12 +31,11 @@  PERL := /usr/bin/perl
 MDEPS := $(wildcard test-*.c)
 $(MDEPS): libm-test.c
 
-TARGET_ULP := $(if $(wildcard libm-test-ulps-$(TARGET_ARCH)),$(TARGET_ARCH),generic)
-ULP_SUFFIX :=
 ifeq ($(TARGET_ARCH),mips)
-ULP_SUFFIX:=$(if $(CONFIG_MIPS_ISA_MIPS64R1)$(CONFIG_MIPS_ISA_MIPS64R2),64,32)
+TARGET_ARCH := $(TARGET_ARCH)$(if $(CONFIG_MIPS_ISA_MIPS64R1)$(CONFIG_MIPS_ISA_MIPS64R2),64,32)
 endif
-TARGET_ULP:=$(TARGET_ULP)$(ULP_SUFFIX)
+
+TARGET_ULP := $(if $(wildcard libm-test-ulps-$(TARGET_ARCH)),$(TARGET_ARCH),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