Sign in Join

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

Mailing lists / fpc-pascal / 2009-05

'compiler host' vs 'compiler target'

7 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

What's the difference between these two sets of parameters. Under two linux systems (32bit and 64bit) both sets of parameters give the same output. So what's the difference between them?

-iSO Return compiler OS
-iSP Return compiler host processor

-iTO Return target OS
-iTP Return target processor

What I am looking for is the version (-iV) and if the compiler is 32bit or 64bit. So which parameter do I use for the latter?

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Marco van de Voort
to Graeme Geldenhuys

In our previous episode, Graeme Geldenhuys said:

What's the difference between these two sets of parameters.

One is the binary it is itself (S), the other is (T) is what it generates. For crosscompilers this differs.

Jonas Maebe
to Graeme Geldenhuys: What's the difference between these two sets of parameters. Under two linux systems…
Graeme Geldenhuys wrote
What's the difference between these two sets of parameters. Under two linux systems (32bit and 64bit) both sets of parameters give the same output. So what's the difference between them?

The host is the architecture/OS for which the compiler binary itself has been compiled. The target is architecture/OS for which the compiler generates code (the target OS can be influenced using the -T parameter). By default, a non-cross-compiler indeed generates code for the same architecure/OS combination as it was compiled for itself.

Show quoted text 9 lines
-iSO Return compiler OS -iSP Return compiler host processor -iTO Return target OS -iTP Return target processor What I am looking for is the version (-iV) and if the compiler is 32bit or 64bit. So which parameter do I use for the latter?

Do you mean whether the compiler binary itself is 32 or 64 bit? There is no specific parameter for that. You can use -iSP and perform some sort of pattern matching for 64 bit CPUs. Or you can run the "file" command against the compiler. I'm not sure what the use for this information could be though.

Jonas

Graeme Geldenhuys
to Jonas Maebe
Jonas Maebe wrote
default, a non-cross-compiler indeed generates code for the same architecure/OS combination as it was compiled for itself.

Ah, so the compiler could be compiled for x86, but it's target when compiling applications could be for a different processor. Cool! I only new the -T parameter.

Do you mean whether the compiler binary itself is 32 or 64 bit? There is no

Yes.

the compiler. I'm not sure what the use for this information could be though.

I'm setting up the automated unit test runs for the tiOPF project. I initially ran it only on one Linux server, but now I want to do it on two servers. One being 32bit and the other being 64bit. Once the unit tests are complete, I use XSLT to generate a newsgroup posting looking similar to the following (see below). The variables will be filled in before posting to the NNTP server. So in the posting I want to mention what FPC version was used and if it was a 32bit or 64bit compiler.

============================
tiOPF2 - FPCUnit Results
------------------------

SVN revision:
r#REV

Build time:
<datetime>

Elapsed time:
<elapsedtime>

Summary:
FPC #FPCVER (#FPCCPU) - Tests run: %d, Failures: %d, Errors: %d

[...snip...]
============================

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Vincent Snijders
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
I'm setting up the automated unit test runs for the tiOPF project. I initially ran it only on one Linux server, but now I want to do it on two servers. One being 32bit and the other being 64bit. Once the unit tests are complete, I use XSLT to generate a newsgroup posting looking similar to the following (see below). The variables will be filled in before posting to the NNTP server. So in the posting I want to mention what FPC version was used and if it was a 32bit or 64bit compiler.

In that case I would use the -TP and -TO output, because the tests were run for that target.

Vincent

Florian Klaempfl
to Vincent Snijders
Show quoted text 12 lines
Graeme Geldenhuys schreef: > I'm setting up the automated unit test runs for the tiOPF project. I > initially ran it only on one Linux server, but now I want to do it on > two servers. One being 32bit and the other being 64bit. Once the unit > tests are complete, I use XSLT to generate a newsgroup posting looking > similar to the following (see below). The variables will be filled in > before posting to the NNTP server. So in the posting I want to mention > what FPC version was used and if it was a 32bit or 64bit compiler. > In that case I would use the -TP and -TO output, because the tests were run for that target.

Actually, for testing, host as well as target architecture might be interesting.