[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:07:10 CEST 2012


On 06.09.2012 18:11, patspiper wrote:
>>> An FPCVER dropdown list in the IDE options could be a solution (Changing
>>> it must trigger the rescan FPC source directory in case it is affected
>>> by the version change). However, will fpc be able to locate ppc386 (the
>>> actual compiler)?
>> Changing the the compiler in the IDE triggers a rescan of the compiler, which
>> updates the FPCVer macro. If the path to the FPC sources contains the macro
>> FPCVer the IDE switches to it. If this directory was not yet scanned it will be
>> scanned now. The IDE has a cache for multiple compilers and multiple FPC source
>> directories.
> Great! But the only shortcoming is that:
> - if the actual compiler is not in the path, fpc cannot call it no
> matter what.

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.

And using the option "-Vsomething" you can specify a suffix the compiler 
will use to locate the ppcXXX. E.g. "-V2-7-1" will tell fpc to look for 
ppc386-2-7-1 on a x86 system.

Regards,
Sven




More information about the Lazarus mailing list