You are correct: compilers are programs, and to become programs, they need to be compiled by another compiler. The very first compilers were written directly in machine code to avoid needing a compiler.
There are plenty of existing compilers that one can use to build a new compiler, and at some point the compiler can become “self-hosting” in the sense that an existing compiled version of that compiler can be used to compile the next version.
Latest Answers