This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Building a native compiler from a cross compiler
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Cc: "Leif Ekblad" <leif at rdos dot net>
- Date: Mon, 16 Jan 2006 20:54:53 +0000
- Subject: Re: Building a native compiler from a cross compiler
- References: <051c01c61adc$5ea5a880$0201a8c0@LEIFACER>
On Monday 16 January 2006 20:35, Leif Ekblad wrote:
> Now that I've succeeded in building both a C and C++
> cross-compiler for RDOS, I would like to build a native
> version (although it probably won't run for a while yet).
> I've tried to do it like this:
>
> ./configure --prefix=/usr/local --target=rdos --host=rdos
This is your problem.
The host is the machine you're going to run the compiler on, ie. it should be
the same as the build machine when building a cross compiler.
eg. --build=i686-pc-linuc-gnu --host=i686-pc-linux-gnu --target=rdos
I generally specify all three as the defaults sometimes do unexpected things.
If you're trying to build a native hosted rdos compiler you need to have an
rdos targeted (native hosted) cross compiler already in your path. This
compiler will be used to build the target libraries.
I suggest you look at crosstool. This knows all the steps required to build a
cross toolchain.
Paul