[mingw-gcc: 25/36] Fix float.h inclusion when gcc's headers precede mingrt in include path

epienbro epienbro at fedoraproject.org
Tue Mar 6 19:20:28 UTC 2012


commit 4b93699fea98cc2b21b87b8dbc591b53fc223a2c
Author: Kalev Lember <kalevlember at gmail.com>
Date:   Fri Aug 26 14:55:57 2011 +0300

    Fix float.h inclusion when gcc's headers precede mingrt in include path
    
    The other part of the change is in mingw32-runtime 3.18-4.

 gcc-1-mingw-float.patch |   18 ++++++++++++++++++
 mingw32-gcc.spec        |    9 +++++++--
 2 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/gcc-1-mingw-float.patch b/gcc-1-mingw-float.patch
new file mode 100644
index 0000000..5f171d4
--- /dev/null
+++ b/gcc-1-mingw-float.patch
@@ -0,0 +1,18 @@
+This file is part of mingw-cross-env.
+See doc/index.html for further information.
+
+This patch has been taken from:
+http://gcc.gnu.org/ml/gcc-patches/2010-06/msg00387.html
+http://sourceforge.net/tracker/?func=detail&atid=302435&aid=3011968&group_id=2435
+
+diff -urN a/gcc/ginclude/float.h b/gcc/ginclude/float.h
+--- a/gcc/ginclude/float.h	2009-04-09 17:00:19.000000000 +0200
++++ b/gcc/ginclude/float.h	2010-06-05 12:03:41.887724045 +0200
+@@ -275,3 +275,7 @@
+ #endif /* __STDC_WANT_DEC_FP__ */
+ 
+ #endif /* _FLOAT_H___ */
++
++#ifdef __MINGW32__
++#include_next<float.h>
++#endif
diff --git a/mingw32-gcc.spec b/mingw32-gcc.spec
index 1e8230b..29f514f 100644
--- a/mingw32-gcc.spec
+++ b/mingw32-gcc.spec
@@ -2,19 +2,20 @@
 
 Name:           mingw32-gcc
 Version:        4.6.1
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        MinGW Windows cross-compiler (GCC) for C
 
 License:        GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions
 Group:          Development/Languages
 URL:            http://gcc.gnu.org
 Source0:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.bz2
+Patch0:         gcc-1-mingw-float.patch
 
 BuildRequires:  texinfo
 BuildRequires:  mingw32-filesystem >= 68
 # Need mingw32-binutils which support %gnu_unique_object >= 2.19.51.0.14
 BuildRequires:  mingw32-binutils >= 2.19.51.0.14
-BuildRequires:  mingw32-runtime
+BuildRequires:  mingw32-runtime >= 3.18-4
 BuildRequires:  mingw32-w32api
 BuildRequires:  mingw32-pthreads
 BuildRequires:  gmp-devel
@@ -83,6 +84,7 @@ MinGW Windows cross-compiler for FORTRAN.
 
 %prep
 %setup -q -n gcc-%{version}
+%patch0 -p1 -b .float
 echo 'Fedora MinGW %{version}-%{release}' > gcc/DEV-PHASE
 
 # Install python files into _mingw32_datadir
@@ -249,6 +251,9 @@ popd
 
 
 %changelog
+* Fri Aug 26 2011 Kalev Lember <kalevlember at gmail.com> - 4.6.1-3
+- Fix float.h inclusion when gcc's headers precede mingrt in include path
+
 * Fri Aug 19 2011 Erik van Pienbroek <epienbro at fedoraproject.org> - 4.6.1-2
 - Build against ppl and cloog
 


More information about the scm-commits mailing list