Gentoo Archives: gentoo-user

From: Grant Edwards <grant.b.edwards@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: How to compile for less bits :)
Date: Mon, 27 Sep 2010 18:53:16
Message-Id: i7qp4k$b2n$1@dough.gmane.org
In Reply to: [gentoo-user] How to compile for less bits :) by meino.cramer@gmx.de
1 On 2010-09-27, meino.cramer@×××.de <meino.cramer@×××.de> wrote:
2
3 > For my microcontroller board (ATMEL AT81RM920, linux based)
4
5 Do you mean AT91RM9200?
6
7 > I want to crosscompile kernels and applications on my 64bit Gentoo
8 > linux.
9
10 That's easy enough.
11
12 > The source of a gcc (prepared on a 32bit system I fear) for
13 > the purpose of crosscompiling from a 32bit system-- target is the
14 > above mentioned processor -- is available.
15 >
16 > Is it possible to compile this gcc as a 32bit-application on my 64bit
17 > system to ensure the same behaviour as it would if to was built on a
18 > "original 32bit Gentoo Linux"?
19
20 You want to compile gcc on an AMD64 machine and end up with a
21 cross-compiler that runs as an IA32 app and generates code for an ARM9
22 target?
23
24 That's called a "Canadian Cross", and is rather tricky, since it
25 involves three different architectures: building a compiler on
26 architecture A (AMD64) to be run on architecture B (IA32) and generate
27 code for architecture C (ARM9).
28
29 Can you explain why you want that rather than a normal cross compiler?
30
31 IOW, why do you want to build a gcc cross compiler that runs as a
32 32-bit application? It's _way_ simpler to build a "normal" cross
33 compiler: building a compiler one architecture (AMD64) to be run on
34 that same architecture (AMD64) and generate code for a second
35 architecture (ARM9).
36
37 > (And in this context: The audio application "chuck" is only as 32bit
38 > application available currently. How is it possible to compile this
39 > on a 64bit system?)
40
41 You use a compiler that generates code for a the desired 32-bit
42 architecture. The "width" of the host is immaterial.
43
44 The easiest way to build such a compiler is using crosstool-ng
45
46 http://ymorin.is-a-geek.org/projects/crosstool
47
48 Crosstool-NG does have some support for doing a Canadian-cross, but I
49 don't see why you would want to do that.
50
51 --
52 Grant Edwards grant.b.edwards Yow! Gibble, Gobble, we
53 at ACCEPT YOU ...
54 gmail.com

Replies

Subject Author
Re: [gentoo-user] Re: How to compile for less bits :) meino.cramer@×××.de