At first you have your old system compiler that produces slow code and doesn't support all the new language features.
You then use this old system compiler to build the new version of the compiler, hoping that the old compiler is able to build the new compiler (it supports all needed features).
You can't bootstrap a cross-compiler as it doesn't produce programs for the local operating system.
As the gap widens between the compiler versions, you are very likely to run into trouble.Each major compiler release is always able to build the next using a bootstrap.Notice how the same problems could occur if you use GCC 4.4 to build a GCC 4.8 cross-compiler.For that reason, it is recommended to use GCC 4.8 to build the GCC 4.8 cross-compiler, so you know no such problems could occur.Bootstrapping takes three times as long as just building a regular compiler, but it makes sure your toolchain is stable.
The last thing to do is run the compiler test suite so you can verify that it works correctly.
The compiler build system will then verify that the second and third compilers are identical, which gives you confidence in the bootstrap.
If the second and third compilers are not identical, the bootstrap failed and you have encountered a compiler bug.
See also the official instructions for building GCC.
Compilers are upgraded through a process called bootstrapping.
In this tutorial we upgrade your system GCC to the most recent version.