Self-hosting
From Free net encyclopedia
Current revision
Self-hosting refers to the use of a computer program as part of the tool chain or operating system that produces new versions of that same program—for example, a compiler that can compile its own source code. Self-hosting software is commonplace on personal computers and larger systems. Other programs that are typically self-hosting include kernels, assemblers, and shells.
If a system is so new that no software has been written for it, then software is developed on another self-hosting system and placed on a storage device that the new system can read. Development continues this way until the new system can reliably host its own development. Development of the Linux operating system, for example, was initially hosted on a Minix system. Writing new software development tools "from the metal" (that is, without using another host system) is almost unheard of nowadays.
Several programming languages are self-hosting, in the sense that a compiler for the language, written in the same language, is available. As with a new computer system, the first compiler for a new programming language must be written in another language (in rare cases, machine language). Self-hosting languages include Lisp, Forth, C, Smalltalk, and FreeBASIC. The first Lisp compiler was written in Fortran.
Reliance on self-hosting programming tools is a potential security risk, as demonstrated by the Thompson hack.