On 11/23/05, Michael Sullivan <[EMAIL PROTECTED]> wrote: > I wanted to be able to cross compile for one of the machines on my > network. I've been following the cross-compilation guide at > http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO I've been following > the guide exactly. The problem is at this stage in the tutorial: > > USE=nocxx emerge cross-hppa2.0-unknown-linux-gnu/gcc > > I want to cross-compile for an i586, so in following the guide I've > changed every occurence of "hppa2.0-unknown-linux-gnu" to > "i586-pc-linux-gnu". binutils emerged just fine for the > cross-compilation environment, but I'm having trouble emerging gcc (Step > 5). I've issued: > > USE=nocxx emerge cross-i586-pc-linux-gnu/gcc > > and it builds for awhile and then it errors: > > /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/gcc.c: In function > `retry_ice': > /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/gcc.c:5897: warning: `fd' > might be used uninitialized in this function > make[1]: *** [gcc.o] Error 1 > make[1]: *** Waiting for unfinished jobs.... > make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.6/work/build/gcc' > make: *** [all-gcc] Error 2 > > !!! ERROR: cross-i586-pc-linux-gnu/gcc-3.3.6 failed. > !!! Function gcc_do_make, Line 1311, Exitcode 2 > !!! emake failed with all > !!! If you need support, post the topmost build error, NOT this status > message. > > The problem is I can't FIND the error. The top of what I've pasted > above is the only thing that I could see that could potentially cause an > error.
The error is: gcc -c -O2 -pipe -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/. -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/config -I/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/../include /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/cppspec.c -o cppspec.o In file included from /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/gcc.c:87: /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/pie-ssp-chain.h:74:2: warning: suggest hiding #error from traditional C with an indented # /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/pie-ssp-chain.h:74:2: #error we need ld w/ -pie support So, it looks like a problem with the binutils package (since ld is part of binutils). I haven't tried cross-compiling with gentoo, so I don't know how to fix this unfortunately...but at least now you know what to google for! -Richard -- gentoo-user@gentoo.org mailing list