[fpc-devel] FreePascal for QNX

Marco van de Voort marcov at stack.nl
Fri Jul 18 11:08:16 CEST 2008


> Now this topic came back to my attention. So  before we will start  
> our work I want to ask some questions.
> 
> Did in the meantime perhaps somebody already started to add QNX as a  
> target?

No change on that front afaik.
 
> Would somebody be interested to do it together?

I (and others) have ported Unix targets before. Most of us hang out on
irc.freenode.net channel #fpc, and can answer questions etc. I'm not aware
of somebody actively working with or on QNX.

> Can somebody make an estimation (in man month) how long it could  
> take?

A skilled person could probably do a basic port to a unix target in a
handful of evenings.

> I have no QNX experience but use Linux privately and heard that  
> QNX is relative similar to Linux.

It is unixy yes. But (see below)

> Peter Vreman suggested in the old  
> mail to look into solaris/sunos post. Is this statement still valid?  
> What is  the most similar supported target?

... better copy from more recent Unix ports that are not as
evolutionary burdened as the Linux port. So I agree mostly with Peter to
have a look at the Sunos port. 

> How would you start? Try to create a native QNX FreePascal or create  
> a cross compiler version supporting QNX? 

Take a copy of the sunos RTL, and start translating updating/checking that
code (constants and structures mostly). Then crosscompile, but not link.
Maybe don't even assemble. (-Aas -s) Then transfer all files to QNX, and
perform assembling and linking there. (to exclude possible problems with
crosslinking/compiling and e.g. mandatory binary identifiers). Later you can
verify crosslinking also works, but in the beginning it only adds a possible
vector where something can go wrong and can add confusion ).

If you don't have a target yet, temporary modify an existing target (or
choose one that matches). If you have a working port, we can talk about
adding the target, but that is not necessary in the first stages.

Don't forget to read the buildfaq
(
http://www.stack.nl/~marcov/buildfaq/buildfaq.html or 
http://www.stack.nl/~marcov/buildfaq.pdf )

for the necessary background info

> In the later case can the cross compiler run on Windows or
> should it run on Linux?

An unix works faster, but Windows is possible. Specially if you don't
crossassemble and crosslink, and thus don't need cross-binutils.
 
> In the forum Carl Eric Codere in 2004 offered to help. Carl, are you  
> still reading this list?

Carl wanders in from time to time (often years apart), but generally isn't
active within FPC anymore since probably the 2003-2004 timeframe.



More information about the fpc-devel mailing list