Hi Kai, When we cross build gcc 4.5 for windows, I found we can build windows gcc binary one week ago, but now the build failed.
After I do a binary search, I found the issue caused by r2945.
r2950 | 2010-07-24 05:50:28 | FAILED
r2945 | 2010-07-24 02:44:15 | FAILED
r2944 | 2010-07-24 02:38:30 | SUCCESS
r2939 | 2010-07-23 17:55:30 | SUCCESS
r2928 | 2010-07-23 05:21:20 | SUCCESS
r2924 | 2010-07-22 18:32:25 | SUCCESS
r2945 remove some *IMPORTANT* macros from /trunk/mingw-w64-headers/crt/float.h,
e.g. FLT/DBL/LDBL_MANT_DIG, FLT_EVAL_METHOD, *ALL* decimal macros
(DEC32/64/128_*, ...)
When I add FLT/DBL/LDBL_MANT_DIG and FLT_EVAL_METHOD back to
/trunk/mingw-w64-headers/crt/float.h,
then the gcc cross build success again.
So I recommend you apply the attached patch at least.
btw, I know FLT_EVAL_METHOD added by C99, but libgfortran/m4/nearest.m4 use it,
is it mean we should use ISO C99 compiler to build gcc 4.5 or later, not ISO
C90 as
http://gcc.gnu.org/install/prerequisites.html ?
Regards,
Dongsheng
Index: mingw-w64-headers/crt/float.h =================================================================== --- mingw-w64-headers/crt/float.h (revision 2984) +++ mingw-w64-headers/crt/float.h (working copy) @@ -31,6 +31,33 @@ #define _MCW_RC 0x00000300 /* Rounding */ #define _MCW_PC 0x00030000 /* Precision */ +/* Number of base-FLT_RADIX digits in the significand, p. */ +#undef FLT_MANT_DIG +#undef DBL_MANT_DIG +#undef LDBL_MANT_DIG +#define FLT_MANT_DIG __FLT_MANT_DIG__ +#define DBL_MANT_DIG __DBL_MANT_DIG__ +#define LDBL_MANT_DIG __LDBL_MANT_DIG__ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +/* The floating-point expression evaluation method. + -1 indeterminate + 0 evaluate all operations and constants just to the range and + precision of the type + 1 evaluate operations and constants of type float and double + to the range and precision of the double type, evaluate + long double operations and constants to the range and + precision of the long double type + 2 evaluate all operations and constants to the range and + precision of the long double type + + ??? This ought to change with the setting of the fp control word; + the value provided by the compiler assumes the widest setting. */ +#undef FLT_EVAL_METHOD +#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ + +#endif /* C99 */ + /* Control word values for unNew (use with related unMask above) */ #define _DN_SAVE 0x00000000 #define _DN_FLUSH 0x01000000
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
