[fpc-devel] Proposal to adapt search patch under Haiku using a target specific option (-WH).

Karoly Balogh (Charlie/SGR) charlie at scenergy.dfmk.hu
Mon Dec 31 20:02:24 CET 2018


Hi,

On Mon, 31 Dec 2018, Olivier Coursière via fpc-devel wrote:

> > if you want, I can integrate those changes into trunk for you.
> Thank you for the offer but i should have some free time in the next two
> days. I should already have the change in a 3.0.4 branch. It should be
> easy to port to trunk i think. A proper patch would be easier to commit.
> >   Did you already start working on other CPU support for Haiku?
>
> Not really. I have investigated what need to be done for x86-64 port but
> the assembly part (cprt0.as) was enough to dissuade me so far ;-) Other
> CPUs will require a working kernel first ;-) Help is welcome though, on
> both sides...

At this point it really should be possible to write all/most of the
startup code in Pascal. I looked into it quickly, and it's actually pretty
simple, there doesn't seem to be anything really in the i386 startup code
at least which might be impossible to tackle in a Pascal version.

It also seems to contain some syscall wrappers, and they should be
perfectly fine in inline assembly as well, and really shouldn't be in the
startup code in the first place, IMO.

And of course a Pascal startup code would ideally "just work" or with
minimal changes on another CPU as well.

I have minimal knowledge about BeOS, but I wrote Pascal startup code for
some systems (incl. required compiler changes), I might take a look soon,
if no one is faster... :)

Cheers,
--
Charlie


More information about the fpc-devel mailing list