]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4: Support linking of 32-bit libraries with ld
authorAndreas Jaeger <aj@suse.de>
Mon, 18 Nov 2002 17:41:29 +0000 (17:41 +0000)
committerBob Friesenhahn <bfriesen@simple.dallas.tx.us>
Mon, 18 Nov 2002 17:41:29 +0000 (17:41 +0000)
on the x86-64, ppc64, s390x and sparc64 GNU/Linux systems.

ChangeLog
libtool.m4

index fe2735966e3a7fb48375e2a69e996271ae9927d3..8cc566ce66f383d56ef69729d74e35d80d015d49 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-18  Andreas Jaeger  <aj@suse.de>, Bo Thorsen  <bo@suse.de>
+
+       * libtool.m4: Support linking of 32-bit libraries with ld
+       on the x86-64, ppc64, s390x and sparc64 GNU/Linux systems.
+
 2002-11-18  Akim Demaille  <akim@epita.fr>
 
        * ltmain.in: Do not change the PATH in the wrappers: let them
index a5e7e85c00af184d7aa32c99518615ace266f798..06b178f2adad8e16ef8855aebabf8cac5c7173ab 100644 (file)
@@ -477,6 +477,32 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
+x86_64-*linux*|ppc64-*linux*|s390x-*linux*|sparc64-*linux*)
+  # 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
+    *32-bit*)
+      case $host in
+       x86_64-*linux*)
+         LD="${LD-ld} -m elf_i386"
+         ;;
+       ppc64-*linux*)
+         LD="${LD-ld} -m elf32ppclinux"
+         ;;
+       s390x-*linux*)
+         LD="${LD-ld} -m elf_s390"
+         ;;
+       sparc64-*linux*)
+         LD="${LD-ld} -m elf32_sparc"
+         ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
 *-*-sco3.2v5*)
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
   SAVE_CFLAGS="$CFLAGS"