This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Question about building binutils as cross-compiler for multiple targets
- From: NightStrike <nightstrike at gmail dot com>
- To: "Nick Clifton" <nickc at redhat dot com>
- Cc: "Kai Tietz" <ktietz70 at googlemail dot com>, binutils <binutils at sourceware dot org>
- Date: Mon, 1 Dec 2008 20:23:16 -0500
- Subject: Re: Question about building binutils as cross-compiler for multiple targets
- References: <90baa01f0811281148tbedcdakc0788c4369b021a8@mail.gmail.com> <b609cb3b0811281416ta94d433nc1c6854bd3ced7cf@mail.gmail.com> <4930F7D9.8010205@redhat.com> <b609cb3b0811290214q2d3fe4c5mb41cea4f26cac208@mail.gmail.com> <90baa01f0811290252x60dfdfdbn8f9e449ca0ba7d91@mail.gmail.com> <49340E3E.7020603@redhat.com>
On Mon, Dec 1, 2008 at 11:18 AM, Nick Clifton <nickc@redhat.com> wrote:
> Hi Kai, Hi Nightstrike,
>
>>>>> root-x86_64-pc-linux/x86_64-pc-mingw32/bin/ld: unrecognised emulation
>>>>> mode: pe-i386
>
>> The name of 32-bit emulation is i386pe, and for the 64-bit it is
>> i386pep. Gcc specifies by the -m option for ld the emulation, not the
>> internal target name IIUC.
>
> So, if I have understood this correctly the problem is this part of
> Nightstrike's gcc patch:
>
>> +#if TARGET_64BIT_DEFAULT
>> +#define SUB_LINK_SPEC "%{" SPEC_64 ":-m pe-x86_64} %{" SPEC_32 ":-m
>> pe-i386}"
>> +#else
>
> Which should be using "-m i386pep" and "-m i386pe" as the linker command
> line switches to select the emulations. Yes ?
Apparently so :)
Grrrr @ naming conventions....
Now the next roadblock is getting ld to accept the libraries that are
built with -m32. We are getting closer......