On 05/15/2012 11:32 AM, H.J. Lu wrote:
> On Tue, May 15, 2012 at 8:06 AM, Nathanael Nerode (GCC)
> <ncn_gc...@fastmail.fm> wrote:
>> On 05/11/2012 12:50 PM, H.J. Lu wrote:
>>> On Mon, Apr 16, 2012 at 10:47 AM, H.J. Lu <hjl.to...@gmail.com> wrote:
>>>> On Tue, Apr 3, 2012 at 7:49 AM, H.J. Lu <hjl.to...@gmail.com> wrote:
>>>>> On Thu, Mar 29, 2012 at 7:34 AM, H.J. Lu <hjl.to...@gmail.com> wrote:
>>>>>> On Sat, Mar 3, 2012 at 9:54 AM, H.J. Lu <hongjiu...@intel.com> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> This patch backports x32 support to libtool:
>>>>>>>
>>>>>>> http://git.savannah.gnu.org/cgit/libtool.git/commit/?id=88992fe6771ec3258bde1b03314ce579da0ac2d5
>>>>>>>
>>>>>>> OK to install?
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>>
>>>>>>> H.J.
>>>>>>> ---
>>>>>>> ommit 0d8c092cac25c3bce5dbfc1981b84df91b3f6086
>>>>>>> Author: H.J. Lu <hjl.to...@gmail.com>
>>>>>>> Date: Mon Dec 12 13:03:14 2011 -0800
>>>>>>>
>>>>>>> Add x32 support to libtool.m4
>>>>>>>
>>>>>>> 2011-12-12 H.J. Lu <hongjiu...@intel.com>
>>>>>>>
>>>>>>> * libtool.m4 (_LT_ENABLE_LOCK): Support x32.
>>>>>>>
>>>>>>> diff --git a/ChangeLog.x32 b/ChangeLog.x32
>>>>>>> new file mode 100644
>>>>>>> index 0000000..b6e01ee
>>>>>>> --- /dev/null
>>>>>>> +++ b/ChangeLog.x32
>>>>>>> @@ -0,0 +1,3 @@
>>>>>>> +2011-12-12 H.J. Lu <hongjiu...@intel.com>
>>>>>>> +
>>>>>>> + * libtool.m4 (_LT_ENABLE_LOCK): Support x32.
>>>>>>> diff --git a/libtool.m4 b/libtool.m4
>>>>>>> index 67321a7..a7f99ac 100644
>>>>>>> --- a/libtool.m4
>>>>>>> +++ b/libtool.m4
>>>>>>> @@ -1232,7 +1232,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"
>>>>>>
>>>>>>
>>>>>> Hi Ralf,
>>>>>>
>>>>>> Can you review this patch?
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>
>>>>> PING.
>>>>>
>>>>
>>>> PING.
>>>>
>>>
>>> PING.
>>
>> I'm not Ralf, and I don't fully understand the details of what's going
>> on here, but here's my review question: you seem to be relying on the
>> format of the output of 'file' containing the exact string "x86-64". Is
>> this the right string to look for? Standard libtool seems to look for
>> the phrase "64-bit" or "32-bit" in the output of 'file'.
>
> Here is the original libtool.m4
>
> case `/usr/bin/file conftest.o` in
> *32-bit*)
> case $host in
> x86_64-*kfreebsd*-gnu)
> LD="${LD-ld} -m elf_i386_fbsd"
> ;;
> x86_64-*linux*)
> LD="${LD-ld} -m elf_i386"
> ;;
>
> In case of "*32-bit", we want
>
> LD="${LD-ld} -m elf32_x86_64"
>
> if `file' also displays "x86-64". Is my patch OK?
>
> Thanks.
>
Yeah, approved. I simply wonder whether we can trust the output of
'file' to keep using 'x86-64' (rather than AMD64, or EM64T, or
whatever). It all seems very fragile.