I am trying to first attempt at compiling a gcc compiler without having a tutorial walk me through it. I plan to install it to /usr/local and leave the distro's compiler alone.
I'm doing this partially for the experience of doing it, but also because the distro I have been playing with "Fuduntu" doesn't seem to have g++ built in to it.
I've compiled gcc before but only following the LFS tutorial. The install manual is helpful but I'm looking more for experience to answer a few question.
1. Since I am installing this on the native machine should I just install dependencies such as m4,gmp,mpfr, and then install the compiler. Or should I just unpack them and specify arguments like
2. I am still green to programming and want to make sure I build in everything I need. I primarily use C and C++. I don't think I'll be using fortran any time soon. This is a 64bit system but I would like to build it multi-arch so I can compile amd_64 as well as x86. I also have a raspberry pi "ARM" and would like to be able to compile this kernels on this system. Is there any optimization I should make for this?
3. Mostly for pedagogical purposes I would like to build this compiler well. I have been told the best way to ensure an error free build is to compile it a second time with itself. Is this recommended? Any suggestions on doing it? Both compilations would be done before installing it right?
4. Is this a good idea? having two compilers installed. It just seemed like leaving the one in /usr/bin alone, at least until I know my new compiler works well, would be a good idea
Sorry about all the questions.