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

Robert Millan rmh at debian.org
Thu Nov 28 10:46:04 UTC 2013


On 28/11/2013 11:08, Marco van de Voort wrote:
>> I don't understand this question. Can you ellaborate?
> 
> Libintl is in the glibc binary iirc, but not in freebsd libc. Libdl
> functions are in libc under FreeBSD.

That's all determined by using glibc. So, we use -ldl and don't use -lintl.

> NTPL is afaik both the revised kernel interface (with other scheduable
> entities than processes) and the lib. But I assume that the NPTL the lib can
> use the same kind of stuff in FreeBSD(KSE)

Yes, something like that I think.

> Then simply compiling a Linux FPC distribution with direct kernel syscall
> disabled (OPT=-DFPC_USE_LIBC) should go a long way.

Yep.

> 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.

In general, they need to match or otherwise we need syscall wrappers to
adjust them.

> 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.

> 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.

-- 
Robert Millan



More information about the Pkg-pascal-devel mailing list