[Vm-dev] Portability problems: compiler flags
Henrik Sperre Johansen
henrik.s.johansen at veloxit.no
Mon Apr 11 20:28:33 UTC 2011
Please read this thread from a month ago.
On 10.04.2011 21:17, Mariano Martinez Peck wrote:
> On Sun, Apr 10, 2011 at 9:08 PM, Andreas Raab <andreas.raab at gmx.de
> <mailto:andreas.raab at gmx.de>> wrote:
> On 4/10/2011 18:35, Mariano Martinez Peck wrote:
>> Sorry for arriving late to the thread. I have a simiar problem
>> now trying to compile Cog in a Windows box with MinGW.
>> The problem is described in another thread:
>> So...if we remove "-mno-fused-madd" from windows confs like
>> CogMsWindowsConfig, then Corquet wouldn't behave correctly ? but
>> if we keep them, it is difficult to compile in some platforms.
>> So...I wonder, I am the only one trying to compile this on
>> Windows? Who do the Croquet guys do to compile with this flag in
> gcc 3.x accepts -mno-fused-madd fine.
> Weird...I have
> $ gcc --version
> gcc.exe (GCC) 3.4.5 (mingw-vista special r3)
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even fo
> and I have the error:
> Scanning dependencies of target FloatMathPlugin
> [ 13%] Building C object
> cc1.exe: error: invalid option `no-fused-madd'
> make: ***
> m/cogVM/blessed/src/plugins/FloatMathPlugin/FloatMathPlugin.c.obj] Error 1
> make: *** [FloatMathPlugin/CMakeFiles/FloatMathPlugin.dir/all] Error 2
> make: *** [all] Error 2
> r MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> - Andreas
>> On Tue, Jan 25, 2011 at 9:05 PM, Nicolas Cellier
>> <nicolas.cellier.aka.nice at gmail.com
>> <mailto:nicolas.cellier.aka.nice at gmail.com>> wrote:
>> 2011/1/25 Andreas Raab <andreas.raab at gmx.de
>> <mailto:andreas.raab at gmx.de>>:
>> > On 1/25/2011 11:38 AM, Igor Stasenko wrote:
>> >>> Squeak uses highly unportable flag "-mno-fused-madd".
>> >>> It isn't present in many systems, even those using GCC,
>> >>> since many systems use older compilers.
>> >>> Also, why do you build fdlibm? It is old stuff that works
>> not so well,
>> >>> we have better libm. Is there a way to use our libm?
>> >> I asked same question few weeks ago.
>> >> Check mailing list archive for discussion.
>> >> In short: differrent libm implementations work differently
>> and some
>> >> have bad support of IEEE standard.
>> > Actually, that's not quite the point. The issue is that
>> Croquet requires
>> > bit-identical computations including floating point. For
>> FPU computations,
>> > the use of -mno-fused-madd avoids the use of the fused
>> > operation by compilers which support it which would
>> generate different
>> > results from compilers not using fused madd.
>> > The usage of fdlibm is similar. As Nicolas has pointed out
>> elsewhere, fdlibm
>> > is in some cases actually inferior of the platform libms
>> (one might say
>> > outright broken) but the requirement for the usage in
>> Croquet isn't really
>> > whether it's "correct" or "good". The requirement is
>> bit-identical results
>> > across all platforms. The results can be wrong as long as
>> they are
>> > consistently wrong. But they mustn't be different.
>> Yes, I was disappointed by exp(1), but fdlibm sin(pi+epsilon)
>> is far
>> far superior to i86 hardwired answer (i86 approximation of pi
>> is well
>> known to be poor).
>> > Having said that, for your regular Squeak VM (i.e., not
>> > bit-identical floating point results) there really isn't a
>> requirement to
>> > use either -mno-fused-madd or fdlibm.
>> > Cheers,
>> > - Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev