summaryrefslogtreecommitdiffstats
path: root/0002-Remove-broken-ieeefp.h-macros.patch
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2016-03-30 17:10:57 -0500
committerYaakov Selkowitz <yselkowi@redhat.com>2016-03-30 17:10:57 -0500
commit94469c1b9b5939888478f49b3c3dfc2f66014fe2 (patch)
tree0f48e754a6864eec723d2f7e64e9967f6f1c0a86 /0002-Remove-broken-ieeefp.h-macros.patch
parent6f8787a3f9deab06ee876881911a167d11f13ffb (diff)
downloadcygwin-94469c1b9b5939888478f49b3c3dfc2f66014fe2.tar.gz
cygwin-94469c1b9b5939888478f49b3c3dfc2f66014fe2.tar.xz
cygwin-94469c1b9b5939888478f49b3c3dfc2f66014fe2.zip
Fix build with GCC 5
Diffstat (limited to '0002-Remove-broken-ieeefp.h-macros.patch')
-rw-r--r--0002-Remove-broken-ieeefp.h-macros.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/0002-Remove-broken-ieeefp.h-macros.patch b/0002-Remove-broken-ieeefp.h-macros.patch
new file mode 100644
index 0000000..c1c5f8f
--- /dev/null
+++ b/0002-Remove-broken-ieeefp.h-macros.patch
@@ -0,0 +1,54 @@
+From ac2f9e23ecd197758e7cc2ca1b8717add3d8762b Mon Sep 17 00:00:00 2001
+From: Yaakov Selkowitz <yselkowi@redhat.com>
+Date: Thu, 11 Feb 2016 20:23:10 -0600
+Subject: [PATCH 2/4] Remove broken ieeefp.h macros
+
+Any attempt to use isnanf, isinff, or finitef from <ieeefp.h> with
+GCC 5 on platforms other than SPU result in a "lvalue required as
+unary '&' operand" error.
+
+ newlib/libc/
+ * include/ieeefp.h (__ieeefp_isnanf): Remove broken macro.
+ (__ieeefp_isinff, __ieeefp_finitef): Ditto.
+
+Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
+---
+ newlib/libc/include/ieeefp.h | 17 ++++++-----------
+ 1 file changed, 6 insertions(+), 11 deletions(-)
+
+diff --git a/newlib/libc/include/ieeefp.h b/newlib/libc/include/ieeefp.h
+index 9eb274d..2ffa456 100644
+--- a/newlib/libc/include/ieeefp.h
++++ b/newlib/libc/include/ieeefp.h
+@@ -270,22 +270,17 @@ int _EXFUN(finitef, (float));
+ #define __IEEE_DBL_NAN_EXP 0x7ff
+ #define __IEEE_FLT_NAN_EXP 0xff
+
+-#ifndef __ieeefp_isnanf
+-#define __ieeefp_isnanf(x) (((*(long *)&(x) & 0x7f800000L)==0x7f800000L) && \
+- ((*(long *)&(x) & 0x007fffffL)!=0000000000L))
+-#endif
++#ifdef __ieeefp_isnanf
+ #define isnanf(x) __ieeefp_isnanf(x)
+-
+-#ifndef __ieeefp_isinff
+-#define __ieeefp_isinff(x) (((*(long *)&(x) & 0x7f800000L)==0x7f800000L) && \
+- ((*(long *)&(x) & 0x007fffffL)==0000000000L))
+ #endif
+-#define isinff(x) __ieeefp_isinff(x)
+
+-#ifndef __ieeefp_finitef
+-#define __ieeefp_finitef(x) (((*(long *)&(x) & 0x7f800000L)!=0x7f800000L))
++#ifdef __ieeefp_isinff
++#define isinff(x) __ieeefp_isinff(x)
+ #endif
++
++#ifdef __ieeefp_finitef
+ #define finitef(x) __ieeefp_finitef(x)
++#endif
+
+ #ifdef _DOUBLE_IS_32BITS
+ #undef __IEEE_DBL_EXPBIAS
+--
+2.7.4
+