[mingw32-runtime] Add a hack for GCC 4.7.
Richard W.M. Jones
rjones at fedoraproject.org
Mon Jan 16 13:12:26 UTC 2012
commit 3c56c5a56b8fad823f58625c7df43f270f175796
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Jan 16 13:11:25 2012 +0000
Add a hack for GCC 4.7.
mingw32-3.18-hack-for-gcc47.patch | 35 +++++++++++++++++++++++++++++++++++
mingw32-runtime.spec | 9 ++++++++-
2 files changed, 43 insertions(+), 1 deletions(-)
---
diff --git a/mingw32-3.18-hack-for-gcc47.patch b/mingw32-3.18-hack-for-gcc47.patch
new file mode 100644
index 0000000..396ecfe
--- /dev/null
+++ b/mingw32-3.18-hack-for-gcc47.patch
@@ -0,0 +1,35 @@
+--- mingwrt-3.18-mingw32.old/mingwex/math/hypotl.c 2002-09-02 04:00:37.000000000 +0100
++++ mingwrt-3.18-mingw32/mingwex/math/hypotl.c 2012-01-16 13:07:44.490045423 +0000
+@@ -2,6 +2,18 @@
+ #include <float.h>
+ #include <errno.h>
+
++/* RWMJ: Hack for gcc 4.7 until upstream fix arrives.
++ * For analysis of the bug, see the bottom of this page:
++ * http://sourceforge.net/tracker/?func=detail&atid=102435&aid=3441135&group_id=2435
++ * This just copies the definitions from GCC 4.7's <float.h> file.
++ */
++#ifndef LDBL_MAX_EXP
++#define LDBL_MAX_EXP __LDBL_MAX_EXP__
++#endif
++#ifndef LDBL_MIN_EXP
++#define LDBL_MIN_EXP __LDBL_MIN_EXP__
++#endif
++
+ /*
+ This implementation is based largely on Cephes library
+ function cabsl (cmplxl.c), which bears the following notice:
+--- mingwrt-3.18-mingw32.old/mingwex/gdtoa/strtodg.c 2009-07-12 23:28:44.000000000 +0100
++++ mingwrt-3.18-mingw32/mingwex/gdtoa/strtodg.c 2012-01-16 13:09:49.206274953 +0000
+@@ -29,6 +29,11 @@
+ /* Please send bug reports to David M. Gay (dmg at acm dot org,
+ * with " at " changed at "@" and " dot " changed to "."). */
+
++/* RWMJ: Hack for gcc 4.7. */
++#ifndef DBL_DIG
++#define DBL_DIG __DBL_DIG__
++#endif
++
+ #include "gdtoaimp.h"
+
+ #ifdef USE_LOCALE
diff --git a/mingw32-runtime.spec b/mingw32-runtime.spec
index 45648be..37e8221 100644
--- a/mingw32-runtime.spec
+++ b/mingw32-runtime.spec
@@ -6,7 +6,7 @@
Name: mingw32-runtime
Version: 3.18
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: MinGW Windows cross-compiler runtime
License: Public Domain
@@ -22,6 +22,9 @@ Patch0: mingwrt-float.patch
# http://sourceforge.net/tracker/?func=detail&aid=3105314&group_id=2435&atid=302435
Patch1: mingwrt-gcc46.patch
+# Big hack for gcc 4.7.
+Patch2: mingw32-3.18-hack-for-gcc47.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -44,6 +47,7 @@ MinGW Windows cross-compiler runtime, base libraries.
%setup -q -n mingwrt-%{version}-mingw32
%patch0 -p1 -b .float
%patch1 -p1 -b .gcc46
+%patch2 -p1 -b .gcc47
%build
@@ -79,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Jan 16 2012 Richard W.M. Jones <rjones at redhat.com> - 3.18-6
+- Add a hack for GCC 4.7.
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.18-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list