]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Fix LD setting for 64-bit Solaris 2/x86.
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 1 Feb 2011 06:34:26 +0000 (07:34 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 1 Feb 2011 06:39:26 +0000 (07:39 +0100)
* libltdl/m4/libtool.m4 (_LT_ENABLE_LOCK) [*-*-solaris*):
Determine GNU ld options for 64-bit Solaris 2/x86.  Detect gld
2.21 _sol2 emulations.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
libltdl/m4/libtool.m4

index 8ff779b455d6da8d3e4c426a1b8de788d4898552..ef4c27cb86aec8846cfe298e4ced80b5b4b13ea2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>  (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  <peter@pogma.com>
 
        Don't loop through wrapper script arguments unnecessarily.
index 033c9a0dc8c1c491e46955e1b4d4c9b53406347e..5cc027b7baab7a0ba7f2303ea90c9b6fcfe33631 100644 (file)
@@ -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"