[Lazarus] Bug 0022814: fpc executable's path should be relative if fpc is present in the env path

Sven Barth pascaldragon at googlemail.com
Thu Sep 6 20:44:00 CEST 2012


On 06.09.2012 20:43, Sven Barth wrote:
> On 06.09.2012 20:38, Mattias Gaertner wrote:
>> On Thu, 06 Sep 2012 21:34:42 +0300
>> patspiper <patspiper at gmail.com> wrote:
>>
>>> On 06/09/12 21:07, Sven Barth wrote:
>>> [...]
>>>> You can pass the option "-Xp/some/path" to fpc to tell it to look for
>>>> ppcXXX in that specific directory. It will look there first, then in
>>>> the path of the fpc binary and then in PATH.
>>> This is interesting! If we can specify in the IDE options the relative
>>> path to move from the fpc binary folder (ex:
>>> /home/me/Programs/fpc/$FPC_VER/lib/fpc/$FPC_VER) to the actual compiler
>>> folder (ex: /home/me/Programs/fpc/$FPC_VER/bin), then the IDE can call
>>> <fpc bin folder>fpc -Xp<relative path>.
>>>
>>> Since all fpc installations have the same relative path, then it becomes
>>> enough to specify that relative path once in the IDE options so that
>>> changing the fpc binary path is enough for all purposes. By default,
>>> that path is ../lib/fpc/$(FPCVER).
>>
>> Maybe you can add this to your fpc.cfg? A normal fpc.cfg already
>> contains a -XP.
>
> Please mind the casing. -XP is the binutils prefix while -Xp is the
> compiler search path.

Also fpc does NOT read the config file.

Regards,
Sven





More information about the Lazarus mailing list