Hi,
How does the compiler (2.6.2, 2.6.4, 2.7.1) search for sub tools like fpcres?
For example: first in its working directory, then in PATH, etc.
What parameters effects this search? -Xp?
Mattias

Mailing lists / fpc-devel / 2014-02
7 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi,
How does the compiler (2.6.2, 2.6.4, 2.7.1) search for sub tools like fpcres?
For example: first in its working directory, then in PATH, etc.
What parameters effects this search? -Xp?
Mattias
Usual order is this:
- path specified by -FD
- path of compiler executable (ppcXXX)
- PATH variable (or "Commands" on Mac OS Classic)
What parameters effects this search? -Xp?
No, -FD is the parameter for this.
Regards,
Sven
Isn't -FD used for the binutils/crossbinutils?
If so, then how are the tools which are in the fpc (not ppcxxx) executable folder (such as fpcres) located?
Stephano
To quote myself:
Usual order is this: - path specified by -FD - path of compiler executable (ppcXXX) - PATH variable (or "Commands" on Mac OS Classic)
Regards,
Sven
Usual order is this: - path specified by -FD - path of compiler executable (ppcXXX) -…
Thanks.
To summarize:
When someone installs under Linux fpc 2.6.2 via installer and 2.7.1 manually to /usr/local you get:
fpc 2.6.2:
/usr/bin/fpc,fpcres,...
/usr/lib/fpc/2.6.2/ppc386
fpc 2.7.1:
/usr/local/bin/fpc,fpcres,...
/usr/local/lib/fpc/2.7.1/ppc386,ppcx86,...
Then you can
a) set PATH
b) or call /full/path/ppcxxx and pass -FD
c) or call fpc and pass -FD and -Xp
d) or call fpc and pass -FD and -V
Correct?
Mattias
My answer to Mattias should have gone to the list, so for completeness I include the full mail instead of leaving things out.
Difference to b is that you can pass the target platform to fpc to have it select the right compiler executable. For b you'll need to do this by switching the ppcxxx manually.
I was referring to your specific scenario. There were no sufixes for the compilers so -V won't help here. Otherwise it will of course work.
Regards,
Sven
To quote myself: Sven
If -FD<toolspath> and -XP<binutilsprefix> are specified, then fpc searches for '<binutilsprefix>-fpcres' in <toolspath> and PATH, and if it does not find it there, searches for 'fpcres' in PATH only. Is it intentional that it excludes <toolspath> from the latter search?
Related code is in comprsrc.pas function tresourcefile.compile.
Stephano