Wrap test-fpucw.c for ARM.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 18 Jun 2013 00:30:44 +0000 (00:30 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 18 Jun 2013 00:30:44 +0000 (00:30 +0000)
ports/ChangeLog.arm
ports/sysdeps/arm/fpu_control.h
ports/sysdeps/arm/test-fpucw.c [new file with mode: 0644]

index 00f3789..c7e22cc 100644 (file)
@@ -1,3 +1,9 @@
+2013-06-18  Joseph Myers  <joseph@codesourcery.com>
+
+       * 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  <joseph@codesourcery.com>
 
        [BZ #14907]
index 2fee79f..3ceb58b 100644 (file)
@@ -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 (file)
index 0000000..9fc721c
--- /dev/null
@@ -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>