libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: x86-64 multilib patch


From: Jakub Jelinek
Subject: Re: x86-64 multilib patch
Date: Fri, 18 Oct 2002 08:52:30 -0400
User-agent: Mutt/1.2.5.1i

On Fri, Oct 18, 2002 at 10:35:56AM +0200, Andreas Jaeger wrote:
> 
> 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?

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

At least on sparc{,v[789]}-*linux*, s390*-*linux*, ppc*-*linux*
it should be the other way around too, as you cannot know what's
the default, ie. something like:

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"
               ;;
     ppc*-*linux*|powerpc*-*linux*)
       LD="${LD-ld} -m elf32ppclinux"
               ;;
     s390*-*linux*)
       LD="${LD-ld} -m elf_s390"
               ;;
     sparc*-*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*
  ;;

For i?86-*linux* it should probably check for all 3 possibilities, ie.
*32-bit* -> elf_i386, *64-bit*x86-64* -> elf_x86_64, *64-bit*IA-64* -> 
elf64_ia64

Or of course better fix the linker, so that emulation defaults
from the first input file.

        Jakub




reply via email to

[Prev in Thread] Current Thread [Next in Thread]