PATCH: Add x32 support to _LT_ENABLE_LOCK
Hi, Here is a patch to update _LT_ENABLE_LOCK to support x32: https://sites.google.com/site/x32abi/home which is the 32bit ABI for x86-64. Binutils 2.22 supports "-m elf32_x86_64" for x32. H.J. --- 2011-12-12 H.J. Lu * m4/libtool.m4 (_LT_ENABLE_LOCK): Support x32. diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 9c2574f..3639851 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1321,7 +1321,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux"
Re: PATCH: Add x32 support to _LT_ENABLE_LOCK
H.J. Lu wrote: Hi, Here is a patch to update _LT_ENABLE_LOCK to support x32: https://sites.google.com/site/x32abi/home which is the 32bit ABI for x86-64. Binutils 2.22 supports "-m elf32_x86_64" for x32. H.J. It issue same as http://lists.gnu.org/archive/html/libtool/2011-10/msg00019.html Roumen
Re: PATCH: Add x32 support to _LT_ENABLE_LOCK
On 12/12/2011 11:32 AM, H.J. Lu wrote: * m4/libtool.m4 (_LT_ENABLE_LOCK): Support x32. Pushed, thanks. Peter
Re: PATCH: Add x32 support to _LT_ENABLE_LOCK
On 12/12/2011 03:01 PM, Roumen Petrov wrote: It issue same as http://lists.gnu.org/archive/html/libtool/2011-10/msg00019.html It's not the same. That section of code is a mess, for all the other systems checking $host is correct, for the linux -> linux cross compile case, its logic looks wrong. Peter