[fpc-devel]fpc and VirtualPC/Mac OS X
Jonas Maebe
jonas at zeus.ugent.be
Tue Oct 21 11:39:16 CEST 2003
On dinsdag, okt 21, 2003, at 10:56 Europe/Brussels, Dr. Karl-Michael
Schindler wrote:
> The problem is that when trying to compile 1.1 I get an error in
> objpas/math.pp around line 50 where the constants minextended and
> maxextended are set. Now, some time back I was trying the similar
> thing with version 1.0.6, but using win95 and win98 and VirtualPC and
> I got stuck at the same thing. I traced back the problem to the values
> of the constants. If I change them to values in the range of single
> precision, the compile goes through. At that time I thought that it is
> related to windows or the fpc port to windows. However, since the
> problem is the same under Linux, my guess is, that is has to do with
> VirtualPC, which otherwise does a fine job.
It has to do with a difference between the PowerPC and 80x86
processors: the former only supports 64bit floating point precision,
the latter 80 bit. Virtual PC does not emulate the full 80 bits,
because this would slow down the emulation immensely.
Instead, it performs all floating point operations using the FPU of the
PowerPC, but as such you lose 16bits of precision.
> Did anybody try to compile fpc using any system (Windows or unix or
> what so ever) under VirtualPC?
A long time ago, I used the Dos version under VirtualPC.
> Did you experience the same problem with math.pp?
I think there was no math.pp yet back then :) You can probably fix it by
a) in rtl/inc/system.inc, remove {$define SUPPORT_EXTENDED}
b) in rtl/objpas/math.pp, change the {$define FPC_HAS_TYPE_EXTENDED} at
the start to {$define FPC_HAS_TYPE_DOUBLE}
c) in compiler/options.pas, remove the statement
"def_symbol('FPC_HAS_TYPE_EXTENDED');" in the {$ifdef i386} section.
Jonas
More information about the fpc-devel
mailing list