[fpc-devel] One fpc.cfg per fpc version

Michael Van Canneyt michael at freepascal.org
Mon Feb 17 19:41:40 CET 2014



On Mon, 17 Feb 2014, Tomas Hajny wrote:

> On Mon, February 17, 2014 17:37, Michael Van Canneyt wrote:
>> On Mon, 17 Feb 2014, Tomas Hajny wrote:
>>
>>>> I agree that the best option would be to use the -V and -P options of
>>>> fpc.
>>>>
>>>> But, for this, it would be best if fpc can list the available versions
>>>> and
>>>> architectures/cross-compilers.
>>>
>>> Assuming that list of supported FPC installations should be configurable
>>> by the user in Lazarus settings, listing of versions wouldn't be
>>> necessary
>>> (it would be incomplete anyway in many cases). I see no use for -V in
>>> this
>>> use case either (due to differences between global and local
>>> installations
>>> and also installations in non-standard places). I believe that -Xp
>>> should
>>> cover everything needed (at least as long as that parameter is supported
>>> by the installed FPC version; if not, invoking fpc with a modified PATH
>>> would be my suggested solution).
>>
>> I think you are wrong.
>>
>> -Xp is there for the case you have a special setup.
>>
>> -V is there for standard installations, so you don't need to know the
>> paths.
>>
>> I think it is by far preferable to use the latter.
>> If you're not going to use/encourage it, you'd better remove it
>> altogether.
>
> I certainly don't need to be right here ;-)

No, sorry, I didn't phrase that correctly.
My phrasing was a bit crude, I should have written that I don't share your point 
of view here. Crude phrasing happens if you answer too quickly :(


>  but my thought was that if
> Lazarus wanted to cater for both standard installations (releases) and
> non-standard ones (allowing users to configure them inside Lazarus rather
> than expecting that Lazarus should detect them automatically, of course)
> as suggested by Mattias in his earlier e-mail, using -Xp would be a more
> generic solution.
>
> That obviously does not imply that -V shouldn't be used with fpc for other
> use cases, it's just that it may not fit the Lazarus need completely (as
> far as I understood Mattias correctly, of course).

Well, generally speaking I think that -Xp should not be there to begin with. 
Starting from there, recommending its use is, obviously, even worse practice :)

But it's up to the lazarus team to see what solution they prefer.

I will limit myself to documenting the various possibilities :-)

Michael.



More information about the fpc-devel mailing list