From: Andreas Jaeger Date: Mon, 18 Nov 2002 17:41:29 +0000 (+0000) Subject: * libtool.m4: Support linking of 32-bit libraries with ld X-Git-Tag: release-1-5~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74985457c0b4724108c5a6c5f8dfd99fb290e56f;p=thirdparty%2Flibtool.git * libtool.m4: Support linking of 32-bit libraries with ld on the x86-64, ppc64, s390x and sparc64 GNU/Linux systems. --- diff --git a/ChangeLog b/ChangeLog index fe2735966..8cc566ce6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-11-18 Andreas Jaeger , Bo Thorsen + + * 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 * ltmain.in: Do not change the PATH in the wrappers: let them diff --git a/libtool.m4 b/libtool.m4 index a5e7e85c0..06b178f2a 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -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"