Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] OT - Confusion with cross-compiling
Date: Thu, 24 Nov 2005 03:10:25
Message-Id: 7573e9640511231903v3fac61b6g60b9e52cc2489c26@mail.gmail.com
In Reply to: [gentoo-user] OT - Confusion with cross-compiling by Michael Sullivan
1 On 11/23/05, Michael Sullivan <michael@××××××××××××.com> wrote:
2 > I wanted to be able to cross compile for one of the machines on my
3 > network. I've been following the cross-compilation guide at
4 > http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO I've been following
5 > the guide exactly. The problem is at this stage in the tutorial:
6 >
7 > USE=nocxx emerge cross-hppa2.0-unknown-linux-gnu/gcc
8 >
9 > I want to cross-compile for an i586, so in following the guide I've
10 > changed every occurence of "hppa2.0-unknown-linux-gnu" to
11 > "i586-pc-linux-gnu". binutils emerged just fine for the
12 > cross-compilation environment, but I'm having trouble emerging gcc (Step
13 > 5). I've issued:
14 >
15 > USE=nocxx emerge cross-i586-pc-linux-gnu/gcc
16 >
17 > and it builds for awhile and then it errors:
18 >
19 > /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/gcc.c: In function
20 > `retry_ice':
21 > /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/gcc.c:5897: warning: `fd'
22 > might be used uninitialized in this function
23 > make[1]: *** [gcc.o] Error 1
24 > make[1]: *** Waiting for unfinished jobs....
25 > make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.6/work/build/gcc'
26 > make: *** [all-gcc] Error 2
27 >
28 > !!! ERROR: cross-i586-pc-linux-gnu/gcc-3.3.6 failed.
29 > !!! Function gcc_do_make, Line 1311, Exitcode 2
30 > !!! emake failed with all
31 > !!! If you need support, post the topmost build error, NOT this status
32 > message.
33 >
34 > The problem is I can't FIND the error. The top of what I've pasted
35 > above is the only thing that I could see that could potentially cause an
36 > error.
37
38 The error is:
39
40 gcc -c -O2 -pipe -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings
41 -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic
42 -Wno-long-long -DHAVE_CONFIG_H -I. -I.
43 -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc
44 -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/.
45 -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/config
46 -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/../include
47 /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/cppspec.c -o cppspec.o
48 In file included from /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/gcc.c:87:
49 /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/pie-ssp-chain.h:74:2:
50 warning: suggest hiding #error from traditional C with an indented #
51 /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/pie-ssp-chain.h:74:2:
52 #error we need ld w/ -pie support
53
54 So, it looks like a problem with the binutils package (since ld is
55 part of binutils). I haven't tried cross-compiling with gentoo, so I
56 don't know how to fix this unfortunately...but at least now you know
57 what to google for!
58
59 -Richard
60
61 --
62 gentoo-user@g.o mailing list