Re: how does gcc pick the assembler, linker?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 3, 2009 at 12:39 PM, Dennis Clarke <dclarke@xxxxxxxxxxxxx> wrote:
>
>> Can someone tell me how gcc picks it's assembler, linker? I am using
>> Sun Solaris 5.8.
>>
>> For example, if I do
>>
>>> gcc -print-prog-name=as
>> /usr/ccs/bin/as
>>
>>> gcc -print-prog-name=ld
>> /usr/ccs/bin/ld
>>
>> However, /usr/ccs/bin is not in the $PATH, $LD_LIBRARY_PATH.
>>
>> I would like gcc to use as, ld located in some other directory. I want
>> this directory to be looked before it searches in /usr/ccs/bin etc.,
>> Any ideas on how to achieve it?
>>
>
> on the configure step use
>
> --with-as=/usr/ccs/bin/as --without-gnu-ld --with-ld=/usr/ccs/bin/ld
>
> so I think that there are options to use GNU binutils if you want.
>

I want to use as, ld in directory say /opt/bin/ instead those in /usr/ccs/bin.
I compiled gcc with --with-gnu-as --with-as=/opt/bin/as --with-gnu-ld
--with-ld=/opt/bin/ld

The resulting gcc works then. It uses /opt/bin/as, /opt/bin/ld as the
assembler and linker.

However, when I open a new terminal and run the same executable gcc,
it now uses /usr/ccs/bin/as, /usr/ccs/bin/ld. I am using
--print-prog-name to check which ld, as are being used.


> However, on well patched Solaris 8 you are fine to use the as and ld in
> /usr/ccs/bin

That is the problem. It is probably not well patched and sadly not
going to be (in my case). The as, ld in /usr/ccs/bin are buggy. I do
not want to use them. I do not know how gcc is picking them up.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux