autoconf
[Top][All Lists]
Advanced

[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: Bob Friesenhahn
Subject: Re: How can I test if the GNU or Sun linker is used?
Date: Fri, 7 Aug 2009 10:19:20 -0500 (CDT)

On Fri, 7 Aug 2009, Dr. David Kirkby wrote:

gcc -Wl,-zallextract simple.c

should return an error if the GNU linker is used, as it will not understand the -zallextract option. But it will not produce any error if gcc uses the Sun linker, since -zallextract is a valid option.

This is a useless test. Quite naturally, GNU ld will try to accept (i.e. ignore) popular Solaris linker options when used under Solaris and the Solaris tools will gradually attempt to accept popular GNU ld options because GCC is popular. That does not mean that these options actually work.

These industry trends tend to break any algorithm which attempts to intuit the tool via feature testing.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

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