collect2 no PATH override

Prof A Olowofoyeku (The African Chief) chief at
Sun Sep 2 19:12:46 CEST 2012

On 1 Sep 2012 at 22:09, Jay Michael wrote:

>      I think "collect2" should honor all of the "where to find compiler
>      components" switches fed to GPC.

>      I think it would be helpful if GPC defaulted to acting as if it
>      were run with "-B <directory containing gpc>" (unless the user
>      provides a "-B" switch).

Again, why?

Well, with this one, it's over to Waldek/Frank/Peter (or you can add 
that feature yourself).

>      The "collect2" in the binary distribution of gpc-2007-09-04 for
>      Windows doesn't seem to make any effort to locate the "ld" it runs
>      -- if there is no "ld" in the PATH, it prints
> ld-orig: No such file or directory

Yes, indeed. And, that problem can easily be solved by adding the 
location of ld.exe to the PATH.

>      I have been running GPC without putting GPC\bin in my PATH.  It has
>      been working.  Then I discovered that when I installed Free Pascal,
>      it took the liberty of updating my system-wide PATH.  When I
>      removed it from my PATH, running GPC\bin\gpc resulted in 
> gpc: installation problem, cannot exec `as': No such file or directory

Blame FreePascal, not gpc.

> Adding "-B GPC\bin" solves that, but has no effect on "collect2" finding
> "ld".

Yes. And why would it? "-B" means something totally different to the 

Best regards, The Chief
Prof. Abimbola A. Olowofoyeku (The African Chief) 

More information about the Gpc mailing list