libtool-patches
[Top][All Lists]
Advanced

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

RE: x86-64 multilib patch


From: Boehne, Robert
Subject: RE: x86-64 multilib patch
Date: Mon, 9 Dec 2002 11:37:32 -0500

Andreas,

It isn't possible to eliminate "ld -r" usage from Libtool, it is
needed to do piecewise linking.  Not all linkers have an option
to pass a list of object files to the linker, so very large
libraries have to be linked by using "ld -r" a few times to
reduce the number of object files in the library link line.

Robert

-----Original Message-----
From: Andreas Jaeger [mailto:address@hidden]
Sent: Friday, October 18, 2002 8:06 AM
To: Jakub Jelinek
Cc: Bo Thorsen; address@hidden; Alexandre Oliva
Subject: Re: x86-64 multilib patch


Jakub Jelinek <address@hidden> writes:

> 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

libtool authors, what solution do you prefer?  Please tell me what to
do so that I can send some patch for this...

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

Or fix libtool to not use ld -r - since this is the only place where
it will case problems...

Andreas
--
 Andreas Jaeger
  SuSE Labs address@hidden
   private address@hidden
    http://www.suse.de/~aj


_______________________________________________
Libtool-patches mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/libtool-patches


reply via email to

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