[Top][All Lists]

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

Re: How can I test if the GNU or Sun linker is used?

From: Dr. David Kirkby
Subject: Re: How can I test if the GNU or Sun linker is used?
Date: Sun, 09 Aug 2009 12:20:14 +0100
User-agent: Thunderbird (X11/20090218)

Richard Ash wrote:
On Fri, 2009-08-07 at 21:51 +0100, Dr. David Kirkby wrote:
Do you have a better idea how to tell what linker gcc uses?

Why do you actually care? Surely what you want to know is what options
work on the linker that you have to hand? So you will need to test the
linker options you want to use, if necessary checking more than one set
of options, to find ones that work.

Sage consists of a large number of programs written by others. We aim to patch their source code as little as possible. Some of their code assumes the GNU linker, irrespective of what the linker actually is. Some of those packages do not use configure scripts anyway - just makefiles.

This is how macros like AX_CFLAGS_WARN_ALL work to enable compiler
warnings (the aim) regardless of the specific compiler in use.

Using macros like these enables you to turn on features when the are
available, and not otherwise. Thus if support for a given flag is added
to either linker in the future, your configure script will continue to
work with it, which isn't the case if you make assumptions about what
linkers support what options based on the linker vendor.


I can see your point. At the moment, there is no effort at all to support any operating system that does not Sun or GNU compilers. i.e. nobody is making any effort at all to support HP-UX, AIX, tru64 etc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]