How to tell if gcc uses GNU or Sun linker on Solaris?
Dr. David Kirkby
david.kirkby@onetel.net
Wed Sep 30 19:38:00 GMT 2009
Marc Glisse wrote:
> On Wed, 30 Sep 2009, Dr. David Kirkby wrote:
>
>> Is there any way to tell for certain if gcc uses the GNU or Sun linker
>> on Solaris, in a program? I would also like to do the same for the
>> assembler, though that is less important to me.
>
> $ gcc -print-prog-name=ld
> /usr/ccs/bin/ld
>
> I don't know how reliable it is though, as on linux it usually just
> prints "ld" without a path.
>
Thanak you. I suspect that probably picks it up from the configure
option. Perhaps I'll try building gcc without specifying a linker, and
see what it returns.
More information about the Gcc-help
mailing list