* libtool.m4: Support linking of 32-bit libraries with ld

on the x86-64, ppc64, s390x and sparc64 GNU/Linux systems.
This commit is contained in:
Andreas Jaeger 2002-11-18 17:41:29 +00:00 committed by Bob Friesenhahn
parent 700774eef3
commit 74985457c0
2 changed files with 31 additions and 0 deletions

View File

@ -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

26
libtool.m4 vendored
View 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"