|
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 2.0.0.19 (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. http://www.nongnu.org/autoconf-archive/ax_cflags_warn_all.html
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. Richard
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.
[Prev in Thread] | Current Thread | [Next in Thread] |