I am using RHEL 6. I would like to install gcc 5.3.0 (gcc-5.3.0.tar.gz) from source. I've already installed GMP, MPC, & MPFR.
How would I approach?
1) read the README
file.
2) read the INSTALL
file.
3) follow the instructions there.
The building process of gcc is a three or four stages process to ensure proper compilation, as it initially needs your native compiler to create a proper compiler version that finally has to be autocompiled with the proper compiler to be complete. This makes the compiler to be compiled first with your native compiler, then it uses the result program to compile itself completely, an produce a controlled copy of the compiler. Then a new compiler is compiled with the result to produce a complete compiler that is compiled again to produce the final autocompiled compiler (that should be identical to the previous stage)
This is a very complex process that will maintain your machine busy for a while. Fortunately, everything is explained in the doc files (and most probably better than here)