I currently try to understand how cross-compilers work. I'm a bit confused about the two-staged compiler compilation process.
As far as I read, the following procedure is applied:
- Compile bintutils for the target architecture
- Compile GCC (stage 1)
- Compile newlib/eglibc/... with GCC
- Compile GCC with the libc (stage 2)
Why is there a second stage involved? Couldn't I just invoke the first stage compiler with some flag like -lc
to include libc?