g****e 发帖数: 172 | |
z****n 发帖数: 1933 | 2 编译器不一定要同一种语言写啊?
如果你发明了一种编程语言假设叫X语言,你可以用其它任何语言写一个编译器来把源
代码变成目标码或机器码。
最早一个编译器估计就是纸带打孔做出来的。呵呵。
【在 g****e 的大作中提到】 : 如果是。那谁来编译的编译器iteself呢?
|
v*****r 发帖数: 1119 | 3 gcc is self-compiled by host gcc.
【在 g****e 的大作中提到】 : 如果是。那谁来编译的编译器iteself呢?
|
m**********e 发帖数: 12525 | 4 编译器能自己编译自己的
比如gcc,就能啥也不用把自己翻译成2进制机器代码
你装个linux,把老的gcc啥的都删了,下一个,丫自己就能把自己搞起来
【在 g****e 的大作中提到】 : 如果是。那谁来编译的编译器iteself呢?
|
S*A 发帖数: 7142 | 5 The gcc use a host cc to compile itself.
The it used the compiled gcc to compile the gcc
again to get to the right result.
You need a host CC to bootstrap your own C
compiler. The first UNIX cc is written in asm.
Now days every one just use gcc to boot strap.
Clang does that too. Now days Clang can compile
itself. |