From ffbfb332d628f97e3094dacecf3c42f8de07cd1f Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 21 Mar 2017 15:47:34 +0100 Subject: [PATCH] ARM: Fix IEEE-754 sqrt implementation Older GCC (e.g. 4.9.3) seem to define __ARM_FP even in case soft-float is used. --- newlib/libm/machine/arm/e_sqrt.c | 2 +- newlib/libm/machine/arm/ef_sqrt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/newlib/libm/machine/arm/e_sqrt.c b/newlib/libm/machine/arm/e_sqrt.c index 8754b9fe0..6f3eb8301 100644 --- a/newlib/libm/machine/arm/e_sqrt.c +++ b/newlib/libm/machine/arm/e_sqrt.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. */ -#if __ARM_FP & 0x8 +#if (__ARM_FP & 0x8) && !defined(__SOFTFP__) #include double diff --git a/newlib/libm/machine/arm/ef_sqrt.c b/newlib/libm/machine/arm/ef_sqrt.c index 81c29f145..3a1ba6cb4 100644 --- a/newlib/libm/machine/arm/ef_sqrt.c +++ b/newlib/libm/machine/arm/ef_sqrt.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. */ -#if __ARM_FP & 0x4 +#if (__ARM_FP & 0x4) && !defined(__SOFTFP__) #include float