[Pkg-pascal-devel] Fwd: Re: fpc op Debian kfreebsd-amd64

Marco van de Voort marcov at stack.nl
Thu Nov 28 11:12:50 UTC 2013


In our previous episode, Robert Millan said:
> > Maybe some minor
> > fallout in cases where kernel and libc structures differ.  (like iirc fdset
> > and sigset_t).
> 
> The sigset_t in userland is provided by glibc, but AFAICT it matches the
> kernel definition.
> 
> Same for fdset.

My memory can be outdated. I don't do day-to-day maintaining of the Linux
port, even though I did set up the current iteration originally.

> > Another possible problem spot is direct IOCTLs, unless (g)libc
> > also changes those to FreeBSD appropiate values.
> 
> No, IOCTLs are a kernel thing. Glibc doesn't do anything about them.

Yes. Termios will not work in that case, and currently is not abstracted to
use libc equivalents.
 
> > The startup code is modified because since the FPC rtl can work both
> > with and without libc, it is seeded with "raw" data. (unprocessed
> > environment etc). Also the frame pointer (EBP/RBP) needs to be nilled
> > because of Pascal's nested procedure support, and exceptions in the FPU mask
> > enabled.
> 
> Better not to go there. You'd be disabling a lot of glue code that is
> needed to preserve compatible API. Just use the libc calls if you can.

I'm not entirely sure what you mean here. What calls? What ABI?

We have been having our own startup for close to 18 years now, so "not go
there" is a bit a passed station.

Anyway, one of my interests in this debian/freebsd port is to give the libc
based port a bit of a testdrive. As said, it is not used anyway in
production atm (IOW all FreeBSD and Linux versions are syscall based)



More information about the Pkg-pascal-devel mailing list