[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: x86-64 multilib patch
From: |
Andreas Jaeger |
Subject: |
Re: x86-64 multilib patch |
Date: |
Fri, 18 Oct 2002 10:35:56 +0200 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Artificial Intelligence, i386-suse-linux) |
What is the status of this patch? Following up the discussion on the
gcc-patches mailing list about this one, I've added support for some
more platforms. Can somebody commit this, please?
Thanks,
Andreas
Bo Thorsen <address@hidden> writes:
> 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"
2002-10-18 Andreas Jaeger <address@hidden>,
Bo Thorsen <address@hidden>
* libtool.m4: Support linking of 32-bit libraries with ld
on the x86-64, ppc64, s390x and sparc64 GNU/Linux systems.
Index: libtool.m4
===================================================================
RCS file: /cvs/libtool/libtool.m4,v
retrieving revision 1.268
diff -u -p -r1.268 libtool.m4
--- libtool.m4 15 Oct 2002 22:50:58 -0000 1.268
+++ libtool.m4 18 Oct 2002 08:26:07 -0000
@@ -477,6 +477,33 @@ 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"
--
Andreas Jaeger
SuSE Labs address@hidden
private address@hidden
http://www.suse.de/~aj