2

I have been using GCC in a nix environment for as long as I remember. Given the wide range of processors, such as those from Atmel, ARM, Intel, and possibly a custom-made soft-core on an FPGA, and types like CISC and RISC, how a compiler like GCC turn my C++ code into machine code has been something I have not looked into.

It turns out GCC needs to be compiled itself (https://gcc.gnu.org/install/build.html), which makes sense, because GCC doesn't know about my CPU. But where does the compiler that builds GCC come from? If that compiler used to compile GCC is in turn compiled with another compiler, where does the buck stop? Where does the "first" compiler for my machine originate?

One of my machines contains an Intel Core 2 Duo. As far as I remember, I've never installed anything from Intel.

Does the chip manufacturer provide the "first" compiler somehow?

marked as duplicate by gnat, Jörg W Mittag, Christophe, Erik Eidt, Stephen C Jul 9 '16 at 0:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.