summaryrefslogtreecommitdiff
path: root/ports/sysdeps/arm
diff options
context:
space:
mode:
Diffstat (limited to 'ports/sysdeps/arm')
-rw-r--r--ports/sysdeps/arm/fpu_control.h2
-rw-r--r--ports/sysdeps/arm/test-fpucw.c5
2 files changed, 6 insertions, 1 deletions
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 <math/test-fpucw.c>