This is the mail archive of the
crossgcc@sourceware.org
mailing list for the crossgcc project.
See the CrossGCC FAQ for lots
more information.
Cannot build a gcc cross-compiler
- From: booleandomain <booleandomain at gmail dot com>
- To: crossgcc at sources dot redhat dot com
- Date: Tue, 21 Jul 2009 23:46:13 -0700
- Subject: Cannot build a gcc cross-compiler
Hello,
I'm trying to build a gcc cross-compiler that runs on
x86_64-unknown-linux-gnu and produces code for i686-unknown-linux-gnu.
My sysroot is located in /stage1 directory.
First of all I built binutils-2.19.1 with --prefix=/stage1/usr
--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--target=i686-unknown-linux-gnu --with-sysroot=/stage1. This works
without problems.
Then I tried building gcc-4.4.0 with --prefix=/stage1/usr
--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--target=i686-unknown-linux-gnu --with-sysroot=/stage1
--enable-languages=c. This doesn't work because the system asks for
(glibc) headers files in /stage1/usr/include. To fix this I probably
have to build glibc with --build=x86_64-unknown-linux-gnu
--host=i686-unknown-linux-gnu, but for that I need a cross-compiler,
which I don't have yet.
It seems a chicken and egg problem: glibc needs gcc, gcc needs glibc.
What can I do?
Thanks.
--
For unsubscribe information see http://sourceware.org/lists.html#faq