[fpc-devel] OpenBSD compiler

Marco van de Voort marcov at stack.nl
Fri Oct 7 16:15:40 CEST 2011


In our previous episode, Marco van de Voort said:

Some status update after some play yesterday evening:

1. The commit from Pierre for the exit syscall seems to work. Exe's don't
crash anymore.

2. Some other minor fixes for stat record (as of yet uncommitted, as I still
have to check the many ifdefs introduced. I think that parts of
bsd/ostypes.inc must move to OS specific includes in time, specially if the
number of targets rises. Darwin is also moving in slightly incompatible
ways, since I see some arm specific darwin ifdefs there.

3. fixed a bug in the compilers parameter processing that seems to be
triggered more in OpenBSD (r19394)

4. The next big crash is, as usual for a new port, in
fexpand/expandfilename/readdir.

netbsd/openbsd seem to only support getdirentries, not getdents (if I
understood correctly getdirentries is more BSD tradition, getdents is more
SysV). Also the telldir functionality might be slightly different among
BSDs. 

Probably the relevant library code needs to translated. Maybe is checking
the libc implementation against the readdir implementation of 1.0.x
(readdir.inc) enough. That's on the menu for me tonight.

5. The problems with cprt0.as were relatively mild, just adding declarations
for the relevant variables and adding a _ to the fpucw reference.  The
result wouldn't link dynamically though, despite OpenBSD having a fairly
recent linker for once (2.15, while old, is the same as FreeBSD uses, so
shouldn't be a problem for normal operation). Or at least ldd would crash on
the result.





More information about the fpc-devel mailing list