diff --git a/ChangeLog b/ChangeLog index 8ff779b4..ef4c27cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-02-01 Rainer Orth (tiny change) + + Fix LD setting for 64-bit Solaris 2/x86. + * libltdl/m4/libtool.m4 (_LT_ENABLE_LOCK) [*-*-solaris*): + Determine GNU ld options for 64-bit Solaris 2/x86. Detect gld + 2.21 _sol2 emulations. + 2011-01-27 Peter O'Gorman Don't loop through wrapper script arguments unnecessarily. diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index 033c9a0d..5cc027b7 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -1374,14 +1374,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64"