[fpc-pascal] Search path order for fpc.cfg
Michael Van Canneyt
michael at freepascal.org
Sat Apr 11 08:35:48 CEST 2020
On Fri, 10 Apr 2020, fredvs via fpc-pascal wrote:
>> Does fpc accept relative path for -Fu in the fpc.cfg config file, something
>> like:
>
>> -Fu./units/$fpctarget
>> -Fu./units/$fpctarget/*
>> -Fu./units/$fpctarget/rtl
>
> No, it seems that it is not possible.
>
> So I propose to do this, dont hurt existing code, only gives happiness:
That will not happen.
-Fu./something
Can *already* be specified and means relative to the CURRENT working directory, not the
compiler binary directory.
Your patch would change this behaviour, and that is not backwards compatible.
You can do
-Fu$PPC_CONFIG_PATH/../units/whatever
(or any other environment variable)
The compiler accepts this. We can add some extra macros there if you want,
but we will not change the behaviour of ./
See also
https://www.freepascal.org/docs-html/current/user/userse18.html#x52-590005.3
But based on this and your other questions, IMO your reasoning is fundamentally
wrong, you should never rely on the compiler location.
Instead maybe you should explain what the actual problem is you are tying to
solve, then we can help you better instead of explaining what cannot or will
not be done.
After all, we've been doing this for 25+ years.
Michael.
More information about the fpc-pascal
mailing list