Gentoo Archives: gentoo-embedded

From: Brian Koropoff <brianhk@×××××××××××××.edu>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] Building native arm gcc toolchain
Date: Sat, 25 Jun 2005 03:07:30
Message-Id: 42BCCD0A.6070604@cs.washington.edu
In Reply to: Re: [gentoo-embedded] Building native arm gcc toolchain by Brian Jackson
1 As far as I know, crossdev only builds a cross compiler which runs on
2 your build system but generates executables for another
3 processor/architecture. I've already used crossdev sucessfully to
4 generate such a compiler for arm. What I want to do now is build a
5 compiler that *runs* on arm and creates arm executables (that is, both
6 the host and target platform is arm, not just the target). This should
7 be as simple as using portage with my crossdev-built cross-compiler and
8 emerging it, but the build fails. Is there any trick to getting portage
9 to build a native gcc to be included in the arm root fs?
10
11 -- Brian Koropoff
12
13 Brian Jackson wrote:
14
15 >Use crossdev
16 >
17 >--iggy
18 >
19 >Brian Koropoff wrote:
20 >
21 >
22 >>I've been working on building a big-endian arm (XScale) system using
23 >>crossdev to generate cross-compilers and portage to compile packages and
24 >>install them into an alternate ROOT. I have a simple
25 >>uclibc/busybox/baselayout-lite rootfs plus 2.6 kernel that boots
26 >>sucessfully. I'm now working on a full-blown glibc/baselayout rootfs
27 >>(it's a pretty beefy XScale board), but I'm having difficulty
28 >>cross-compiling a native gcc toolchain for arm. The gcc compile fails
29 >>with the following error:
30 >>
31 >>make[2]: *** No rule to make target
32 >>`../build-i686-pc-linux-gnu/libiberty/libiberty.a', needed by
33 >>`genmodes'. Stop.
34 >>make[2]: *** Waiting for unfinished jobs....
35 >>make[2]: Leaving directory `/var/tmp/portage/gcc-3.4.4/work/build/gcc'
36 >>make[1]: *** [stage1_build] Error 2
37 >>make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.4/work/build/gcc'
38 >>make: *** [bootstrap-lean] Error 2
39 >>
40 >>I'm actually using a small build script to set up environment variables
41 >>and automate a few other odds and ends, but I get the same error message
42 >>when I initiate the build manually with:
43 >>
44 >>USE="-* arm" ACCEPT_KEYWORDS=arm CBUILD=i686-pc-linux-gnu
45 >>CHOST=armeb-unknown-linux-gnu CTARGET=armeb-unknown-linux-gnu
46 >>ROOT=/image/armeb-unknown-linux-gnu-devimage emerge sys-devel/gcc
47 >>
48 >>From the looks of it, it's succesfully cross-compiling libiberty for
49 >>arm. I'm guessing what's going on is that genmodes is used in the gcc
50 >>build process and must be compiled for the build system (x86), but no
51 >>x86 libiberty is available because the configure script is not setting
52 >>this up properly. I'm not particularly familiar with the gcc build
53 >>system. What do I need to do to get a native arm compiler? Has anyone
54 >>else tried cross-compiling a native compiler toolchain for arm? The arm
55 >>stage tarballs must include a compiler, so I'm guessing it's possible to
56 >>create it with portage but I'm doing something wrong. Thanks in advance.
57 >>
58 >>-- Brian Koropoff
59 >>
60 >>
61 >
62 >
63 >
64 >
65
66 --
67 gentoo-embedded@g.o mailing list

Replies