This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: ct-ng x86_64-host, but want ia32 binaries




----------------------------------------
> From: yann.morin.1998@anciens.enib.fr
> To: crossgcc@sourceware.org
> Subject: Re: ct-ng x86_64-host, but want ia32 binaries
> Date: Thu, 29 Jan 2009 17:12:44 +0100
> CC: dreiland@hotmail.com
>
> Doug,
> All,
>
> On Thursday 29 January 2009 16:45:42 Doug Reiland wrote:
>> I guess this is a candian-cross, but I am hoping this is a easy case.
>> My build system is x86_64
>> My host system is x86_64, but I want to treat as ia32/i686 in case I need
>> to move them to new server
>> My targets will be i686 and x86_64.
>> I see CT_CFLAGS_FOR_HOST being use in the core-gcc build, but I didn't see
>> a way set this via menuconfig.
>> I did try to edit crosstool-NG.sh and change where it initializes this and
>> try initializing this to -m32 to see if I get lucky, but I don't get past
>> GMP configure.
>> Anybody got a better way with ct-ng or am I going to have to do a full
>> candian-cross.
>> In the past (scripting days), I could just force --host to something i386.
>
> If you want your toolchain to generate x86 code, then you need to say so:
> "Target options" --> "Target Architecture" --> x86
>
> This will create a toolchain that does x86 (and only x86). You can then
> run the binaries on a x86, or on a x86_64 with 32-bit emulation.
>
> As of today, crosstool-NG does not know how to generate a multi-lib toolchain,
> because it becomes quite complex for certain architectures and certain C
> libraries.
>
> Eg. on ARM, you have:
> - opcodes: arm, thumb/thumb2, thumb/thumb2 with interworking
> - FPU: fpa, fpe2, fpe3, maverick, vfp, neon
> - endianness: big, little
> - ABI: OABI, EABI
> - and so on...
> which gives quite a bunch of comibantions... At least, uClibc is not
> multi-lib-aware, so you'd have to build [put big number here] versions
> of the C library. glibc may have some multi-lib-awareness, but it is not
> quite easy to build in this case. And you'd have to build the binutils
> target libraries for each combinations as well. Plus gdbserver...
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +0/33 662376056 | Software Designer | \ / CAMPAIGN | ___ |
> | --==< ^_^>==-- `------------.-------: X AGAINST | \e/ There is no |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
> `------------------------------^-------^------------------^--------------------'
>
 
I want to produce a cross-compiler that executes on a ia32 host and produces ia32/i686 binaries
I want to produce another cross-compiler that executes on a ia32 host and produces x86_64 binaries.
 
The bad thing is I am being the cross-compilers on a x86_64 system.
The reason is I am sharing these cross-compilers across different development servers and I cannot be certain that they are all x86_64 servers.
 
I know this is a special case that can't be generically coded for in the scripts. Note, I am testing a build now that just might work. I had to force:
CT_CFLAGS_FOR_HOST=-m32 in crosstool.NG.sh
ABI=32 in gmp.sh
 
If this works, maybe we can expose these variables cooresponding .in files so they can be controlled via menuconfig.
 
Thanks for your response.
 
_________________________________________________________________
Windows Live™ Hotmail®…more than just e-mail. 
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_howitworks_012009

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]