linux-mips
[Top] [All Lists]

Re: cross compiling gcc for mips

To: qi tao <demon19840308@hotmail.com>
Subject: Re: cross compiling gcc for mips
From: James E Wilson <wilson@specifix.com>
Date: Wed, 19 Jul 2006 11:35:03 -0700
Cc: linux-mips@linux-mips.org
In-reply-to: <BAY122-F271C1ACCD1969B2F38611AAD630@phx.gbl>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <BAY122-F271C1ACCD1969B2F38611AAD630@phx.gbl>
Sender: linux-mips-bounce@linux-mips.org
On Tue, 2006-07-18 at 00:12, qi tao wrote:
> First I built binutils and now I was setting up the bootstrap compiler.
> In file included from ../../gcc-4.1.1/gcc/crtstuff.c:68:
> .../../gcc-4.1.1/gcc/tsystem.h:90:19: error: stdio.h: 没有那个文件或目录

You can't build the gcc libraries unless you have a C library first. 
And, of course, you can't build a C library unless you have a compiler
first.  This circular dependency makes bootstrapping a bit tricky.  

The basic process here is that you have to do a glibc make
install-headers first which gives you C library headers, and then a
partial gcc build minus the libraries, then a full glibc build, then a
full gcc build.

This is simpler is you just follow instructions written up by someone
else who already knows how to do it.  The one I recommend is the
crosstool scrips written by Dan Kegel.  There is a pointer to them on
the linux-mips.org wiki.
    http://www.linux-mips.org/wiki/Toolchains
    http://kegel.com/crosstool/
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com


<Prev in Thread] Current Thread [Next in Thread>