Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I was wondering the other day. How do you compile GCC if you don't have GCC and GCC is a dependency? And how did the first version of GCC get compiled? And how do future versions of GCC get compiled, by older versions? And then after they finish compiling the new version of GCC with the old version of GCC, do they then go ahead and recompile the new version of GCC with the newly compiled version of GCC which they just built??? /me brain explodes just thinking about it
I still couldn't find anything in depth on the GCC site. I noticed something about the prerequisites, but they don't say how they build new versions of GCC. Did they use GCC 2.xx to build the GCC 3.xx compiler? And then after they built the GCC 3.xx compiler, did they rebuild the 3.xx compiler again with the new 3.xx binary?!?!?!
actually, the gcc tarball has its own static compiler which is used for compiling once.
afterwards, it uses the now compiled gcc to compile itself again,
i think the loop repeates for abt 3 times (and the process is called as bootstraping or something like that)
Thats how gentoo does it but you can also build it from scratch if you follow the steps on the gcc site but I already get lost with the configuration part.
If you ever loose your compiler with gentoo best thing is to either install rpm's,compile the compiler and get rid of the rpm's after or chroot from a installation cd and install it.
Thanks for the replies, that clears things up a bit!!! Still, if anyone does locate that GCC link to the bootstrapping process let me know. Also, others who browse this thread may be interested in the link as well ;-)
"And how do future versions of GCC get compiled, by older versions?"
"And then after they finish compiling the new version of GCC with the old version of GCC, do they then go ahead and recompile the new version of GCC with the newly compiled version of GCC which they just built???"
This is possible but unnecessary.
"And how did the first version of GCC get compiled?"
It was compiled on some other compiler.
The first C compiler was probably written in an assembly language.
The first assembler was written in octal machine code about 1946.