[fpc-devel] fpc binary for OpenBSD 4.4

Tomas Hajny XHajT03 at mbox.vol.cz
Fri Mar 13 20:52:41 CET 2009


On Fri, March 13, 2009 19:57, Constantine Cusulos wrote:
> Before posting here, i asked a question about binary emulation on
> openbsd-misc (http://marc.info/?l=openbsd-misc&m=123688274008042&w=2).
> If i combine the answers i got there with a little openbsd-misc
> archive-searching, i can say that OpenBSD's emulation capabilities are
> at least problematic nowdays.
>
> So, my answer to my initial question would be, most probably, no.
>
> Regarding a "fresh start", as Marco van de Voort put it, i have found
> some info in the wiki (namely
> http://wiki.freepascal.org/Porting_Free_Pascal and
> http://wiki.freepascal.org/RTL_development_articles).

Yes, I believe that this should be the right place to start.


> @Tomas Hajny
>> The other would be only
>> creating assembler files on the source platform using -s parameter and
>> copying these to the target platform to assemble and link the ppc386/fpc
>> binary there (possibly after adjusting some paths in the linker script).
>
> I do not fully understand this process. From the fpc man page:
>
> -s     Tells the compiler not to call the assembler and linker.
> Instead, the compiler writes a script, PPAS.BAT under DOS, or ppas.sh
> under Linux, which can then  be  executed to produce an executable.
>
> There is not much info beyond that. So, a shell script is produced under
> linux? That could be a potential problem since OpenBSD uses the korn
> shell and linux uses the bash shell.

I don't think this should be a real problem. As far as I know, the
differences between Korn shell and bash aren't so dramatic as far as I
remember (well, certainly not so big compared to e.g. C shell) and the
created shell script is just a simple sequence of invocations of external
commands. If this really becomes a problem, you'd need to solve it for
native compiler too.

However, the main problem is certainly the non-availability of an (up to
date) OpenBSD RTL support; admittedly, I didn't know (or rather remember)
that noone touched it since the FPC 1.x times.

Tomas






More information about the fpc-devel mailing list