On 12/11/2010 17:00, Lennart Sorensen wrote:
On Fri, Nov 12, 2010 at 02:55:30PM +0000, Philip Nye wrote:
Convention has it that to build a cross compiler from scratch you need to
do it twice - stage-1 is a restricted version to build the target
library, the stage-2 is a full generic compiler. However, I don't know
the workings of GCC sufficiently well to fully understand this.
In all my uClinux projects, I have the library (uClibc) integrated with
the project and have it configured and compiled differently for different
projects. I then point the compiler explicitly at the project's uClibc
build using command line switches. (including -nostdlib etc.)
In this situation is there any benefit to carrying out the second
compiler pass? What about C++ - can that be built with the first stage
compiler?
I believe the idea is that whatever compiler you start with might be buggy
and not work correctly to compile your new compiler, so a minimal stage1 c
compiler is built that is known to be able to build the compiler properly.
Thanks Len - this is very plausible, but doesn't fit the facts when building
a cross compiler:
Both stage-1 and stage-2 get built using exactly the same native compiler on
the host system, and (unless your are building "canadian cross" where a
third system is involved), both stage-1 and stage-2 are compiled and run on
the host but generate code for the target.
Philip
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev