diff options
author | Andreas Jaeger <aj@gcc.gnu.org> | 2002-11-20 16:18:53 +0100 |
---|---|---|
committer | Andreas Jaeger <aj@gcc.gnu.org> | 2002-11-20 16:18:53 +0100 |
commit | 3b75d2378c76887747a4c2cbdc0ddf793db56468 (patch) | |
tree | d61573405a2e44a99338ab463a2d060f3c70e9ee /libtool.m4 | |
parent | 6d1d1db0447e3ef7ca9019487668923b7cffe865 (diff) | |
download | gcc-3b75d2378c76887747a4c2cbdc0ddf793db56468.zip gcc-3b75d2378c76887747a4c2cbdc0ddf793db56468.tar.gz gcc-3b75d2378c76887747a4c2cbdc0ddf793db56468.tar.bz2 |
libtool.m4 (libtool_flags): Add patch from libtool CVS...
* libtool.m4 (libtool_flags): Add patch from libtool CVS: Support
linking of 32-bit libraries with ld on the x86-64, ppc64, s390x
and sparc64 GNU/Linux systems.
From-SVN: r59304
Diffstat (limited to 'libtool.m4')
-rw-r--r-- | libtool.m4 | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -175,6 +175,48 @@ ia64-*-hpux*) rm -rf conftest* ;; +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*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 + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" |