Prof A Olowofoyeku (The African Chief) wrote:
On 15 Nov 2002 at 18:51, Frank Heckenbach wrote:
[...]
In a slightly longer perspective, the compiler driver (`gpc') will be merged with `gcc' (the only difference probably being the automatic linking of the Pascal runtime), so any local changes we'd now make to `gpc' would not last very long, anyway.
What is the time scale for this? I have already written the code for the GPC driver to read 5 extra environment variables (to cater for "-- unit-path", "--object-path", "--unit-destination-path", "--object- destination-path", and "--executable-path").
Unfortunately, the latter 3 are not ok because (a) they're needed by the driver and (b) they may break compilation of 3rd party packages (which don't expect their objects to go somewhere else; whereas adding a search path (at the end) won't make a difference unless a file is not found otherwise which would be a problem, anyway).
The code is actually quite simple (I am sure it can be significantly improved), and not very long (I have a patch ready for anyone who is interested). One can continue to use the patch until the gpc and gcc drivers are merged and the "gp" utility is ready.
Well, if you think so. But then please do handle all support requests resulting from it (now and in the future when things are changed). I don't want to waste my time with such local changes. And please put a clear note in the version message etc. to describe this change, to avoid confusing anyone who switches between this and an unpatched version.
[...]
That said, for the special case of unit/object paths, it might be possible to read environment variables in the compiler proper (`gpc1'), since the compiler driver doesn't need them (unlike, e.g., LIBRARY_PATH). I'd have to check this in detail ...
Please let us know when you have ascertained this. It is better for this type of thing to be implemented centrally (i.e., in GPC itself) than via local changes.
Indeed. I'll now implement environment variables GPC_UNIT_PATH and GPC_OBJECT_PATH (names alright?) which if set are added at the *end* (see above) of the respective paths. I'll probably not use them myself, and therefore won't test them very well, so you might want to after the next release.
Frank