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


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.  |
`------------------------------^-------^------------------^--------------------'


--
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]