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

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

 



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

This gcc on Solaris (SPARC) for example is build with both the Sun linker and assembler.

Parsing the output of gcc -v is not an option, as its not necessary for these to be specified - one could leave them, and let the gcc configure script chose one.

Ignore the other guy ...

This is the type of code I am using to determine if GNU ld is used under Solaris:

AC_CACHE_CHECK([for linker lazyload option],[gm_cv_ld_lazyload],
[
gm_cv_ld_lazyload='none'
case "${host}" in
  *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
    if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
       gm_cv_ld_lazyload='-Wl,-zlazyload'
    fi
    ;;
esac
])

The test of $lt_cv_prog_gnu_ld needs to occur after libtool has been configured. If you are not using libtool, then you will need to see how libtool does it.

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


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux