From c411604296b4e8c0d678addd03bfda024d652a2e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 18 Jun 2013 00:30:44 +0000 Subject: [PATCH] Wrap test-fpucw.c for ARM. --- ports/ChangeLog.arm | 6 ++++++ ports/sysdeps/arm/fpu_control.h | 2 +- ports/sysdeps/arm/test-fpucw.c | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 ports/sysdeps/arm/test-fpucw.c diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm index 00f37892cd..c7e22cc0d1 100644 --- a/ports/ChangeLog.arm +++ b/ports/ChangeLog.arm @@ -1,3 +1,9 @@ +2013-06-18 Joseph Myers + + * sysdeps/arm/fpu_control.h [!_LIBC && __SOFTFP__]: Change + condition to [!(_LIBC && !_LIBC_TEST) && __SOFTFP__]. + * sysdeps/arm/test-fpucw.c: New file. + 2013-06-17 Joseph Myers [BZ #14907] diff --git a/ports/sysdeps/arm/fpu_control.h b/ports/sysdeps/arm/fpu_control.h index 2fee79fa88..3ceb58b2fc 100644 --- a/ports/sysdeps/arm/fpu_control.h +++ b/ports/sysdeps/arm/fpu_control.h @@ -19,7 +19,7 @@ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H -#if !defined(_LIBC) && defined(__SOFTFP__) +#if !(defined(_LIBC) && !defined(_LIBC_TEST)) && defined(__SOFTFP__) #define _FPU_RESERVED 0xffffffff #define _FPU_DEFAULT 0x00000000 diff --git a/ports/sysdeps/arm/test-fpucw.c b/ports/sysdeps/arm/test-fpucw.c new file mode 100644 index 0000000000..9fc721c7f4 --- /dev/null +++ b/ports/sysdeps/arm/test-fpucw.c @@ -0,0 +1,5 @@ +/* Defining _LIBC_TEST stops fpu_control.h from defining the + hard-float versions of macros (for use with dynamic VFP detection) + when compiling for soft-float. */ +#define _LIBC_TEST +#include