[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
x86-64 multilib patch
From: |
Bo Thorsen |
Subject: |
x86-64 multilib patch |
Date: |
Wed, 2 Oct 2002 08:59:23 +0200 |
User-agent: |
KMail/1.4.1 |
Hi all,
This patch fixes 32 bit compilation on x86-64. The problem is that "ld -r" is
used for building libraries and ld doesn't understand linking 32 bit objects
unless it's given the -m elf_i386 switch.
If it's Ok, can someone else commit it please? (And let me know if it's been
done; I have permission to check it into gcc once it's in libtool cvs.)
2002-10-02 Bo Thorsen <address@hidden>
* libtool.m4: Fix x86-64 multilib linking.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.264
diff -u -r1.264 libtool.m4
--- libtool.m4 10 Sep 2002 13:50:06 -0000 1.264
+++ libtool.m4 2 Oct 2002 06:54:15 -0000
@@ -477,6 +477,19 @@
rm -rf conftest*
;;
+x86_64*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*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
--
Bo Thorsen | Praestevejen 4
Senior Software Engineer | 5290 Marslev
Klarälvdalens Datakonsult | Denmark
- x86-64 multilib patch,
Bo Thorsen <=