[Lazarus] Using different FPC versions

Michael Van Canneyt michael at freepascal.org
Mon Feb 10 10:33:20 CET 2014


Hello,

A single Lazarus installation
* Can work with different CPUs. 
* It can work with different OS-es.
* It can work with different widgetsets.

It caters for this by adapting the compiler unit search/output path into $(cpu)-$(os)/$(widgetset)
- and it does so by default. This is great. (the variable names used may differ from actual names).

Lazarus also can work with different compilers versions: 
you can select the compiler in the options dialog.

This is great too, since I must work with the trunk and release versions of FPC on a regular basis.

But, in contrast with the other parameters, the compiler version is not built in the unit path 
(search/output) by default, as it is for the installed FPC itself.

This means that each time I switch compiler version, lazarus recompiles every package
(lclbase/lcl) - as it must.

I can avoid this by using 2 lazarus installations, and using --primary-config-path.
Which means a restart.

However, this can be avoided to a large extent by simply also adding the compiler version to the unit output path:
$(fpcversion)/$(cpu)-$(os)/$(widgetset)
or
$(cpu)-$(os)/$(widgetset)/$(fpcversion)
or even
$(fpcversion)-$(cpu)-$(os)/$(widgetset)

I could probably set this path manually in every package on my system. 
Cumbersome, and would probably conflict with svn updates.

Is there any plan to add such a feature by default, or have I missed something, and there is actually 
an easier way than 2 separate installations to achieve the same effect, i.e. use 2 compiler versions 
without requiring a restart and a complete recompile ?

Michael.




More information about the Lazarus mailing list