Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-07

FreePascal for QNX

10 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Müller

Hi,

I already posted a question related to this topic two years ago: http://community.freepascal.org:10000/lists/fpc-pascal/2006-February/ 010111

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?

Would somebody be interested to do it together?

Can somebody make an estimation (in man month) how long it could take? I have no QNX experience but use Linux privately and heard that QNX is relative similar to Linux. 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?

How would you start? Try to create a native QNX FreePascal or create a cross compiler version supporting QNX? In the first case which most recent version would be compilable with FP V1.10 for QNX. In the later case can the cross compiler run on Windows or should it run on Linux?

In the forum Carl Eric Codere in 2004 offered to help. Carl, are you still reading this list?

Thanks and regards

Michael

Reply by email

Marco van de Voort
to Michael Müller
Show quoted text 5 lines
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.

Reply by email

Florian Klaempfl
to Marco van de Voort
Show quoted text 5 lines
> 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?

Afaik 1.0.x had qnx support so this would be a good start. I'll see if I find the old sources and import them into cvs.

Reply by email

Michael Müller
to Marco van de Voort: No change on that front afaik. I (and others) have ported Unix targets before. Most of us…

Hi Marco,

thanks for the anwser.

Marco van de Voort wrote 5 lines
> 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.

Your effort estimation sounds promising although you didn't notice which skills such a person needs. ;-)

Regards

Michael

Reply by email

Michael Müller
to Florian Klaempfl: Afaik 1.0.x had qnx support so this would be a good start. I'll see if I find the old…

Hi Florian!

Florian Klaempfl wrote 9 lines
Marco van de Voort schrieb: >> 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? Afaik 1.0.x had qnx support so this would be a good start. I'll see if I find the old sources and import them into cvs.

I thought that V1.0 and V2.x are internally different. So I wouldn't have expected that there is much that could be used from 1.0. Also since I would have expected that QNX itself would have changed after such a long time. Or do you think that for the RTL, constants and data types I can reuse a lot?

Regards

Michael

Reply by email

Marco van de Voort
to Michael Müller
Show quoted text 17 lines
Am 18.07.2008 um 14:26 schrieb Florian Klaempfl: > Marco van de Voort schrieb: >>> 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? > > Afaik 1.0.x had qnx support so this would be a good start. I'll see > if I find the old sources and import them into cvs. I thought that V1.0 and V2.x are internally different. So I wouldn't have expected that there is much that could be used from 1.0. Also since I would have expected that QNX itself would have changed after such a long time. Or do you think that for the RTL, constants and data types I can reuse a lot?

You can peek at it for structures and types. But even then, since they are 5 year old, you need to check them against current versions in the headers.

IMHO it shouldn't have been added to SVN, no file from that dir is reusable as it is.

While the current 2.x implementation of the unix rtl are based on the ideas behind the 1.0.x BeOS and QNX ports, the implementation is different and 5 years further evolved.

The Solaris port would be IMHO the best to base an initial version on, it is a less complicated port as e.g. FreeBSD or Linux.

Reply by email

Marco van de Voort
to Michael Müller: thanks for the anwser. Your effort estimation sounds promising although you didn't notice…
Show quoted text 10 lines
Am 18.07.2008 um 11:08 schrieb Marco van de Voort: >> 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. Your effort estimation sounds promising although you didn't notice which skills such a person needs. ;-)

Somebody with experienced in making *nix ports for FPC.

How hard is it to run QNX? If a free version can be run in a free virtual suite, maybe some people can easier help.

Reply by email

Florian Klaempfl
to Marco van de Voort: You can peek at it for structures and types. But even then, since they are 5 year old,…
Show quoted text 5 lines
You can peek at it for structures and types. But even then, since they are 5 year old, you need to check them against current versions in the headers. IMHO it shouldn't have been added to SVN, no file from that dir is reusable as it is.

It's still easier to check existing and previously working solutions (startup code, structures, function prototyps etc.) and adapt them than starting from scratch ;)

Reply by email

Marco van de Voort
to Florian Klaempfl
Show quoted text 8 lines
Marco van de Voort schrieb: > You can peek at it for structures and types. But even then, since they are 5 > year old, you need to check them against current versions in the headers. > > IMHO it shouldn't have been added to SVN, no file from that dir is reusable > as it is. It's still easier to check existing and previously working solutions

There is nothing close to working there, in fact the Solaris/FPC_USE_LIBC RTL is closer to working, since it defines a lot of libc functionality already.

(startup code, structures, function prototyps etc.) and adapt them than starting from scratch ;)

There are no functions the same (unix typing fp*, change of linux unit "inventions" to standard posix names), and there are hardly any needed for a libc RTL. So structs and constants only, but they'll need correction for unix typing and naming (the linux unit had different names), and checking for a 5 year period.

And to peek at the code a bit, it wasn't necessary to enter them in SVN. The next operation will have to delete all files again, and commit real ones.

Reply by email