4 ms·
It lists a goal as "compiling real-world programs such as the linux kernel" The last time I investigated the linux kernel had so many gcc-isms that it was prob
by aidenn0 8y ago
It lists a goal as "compiling real-world programs such as the linux kernel"
The last time I investigated the linux kernel had so many gcc-isms that it was probably true that if you could compile the linux kernel, you could probably compile any program targeted to gcc.
- ggm 8y agoBSD kernel is maybe a cleaner target?
- nickpsecurity 8y agoxv6 might be nicer start: https://pdos.csail.mit.edu/6.828/2012/xv6.html https://pdos.csail.mit.edu/6.828/2012/xv6.html For bootstrapping, the overall consensus is you make enough C to compile, without optimizations, early version of GCC which compiles itself from there until you reach current version. Several folks are trying to compile TCC instead to leverage it and dwheeler's work.
- wtracy 8y agoOther "alternative" compilers like tcc have pulled it off, supposedly without patching the kernel, so it is doable.
- e12e 8y agoDoes tcc compile a vanilla kernel? I know tccboot added some minor patches: https://bellard.org/tcc/tccboot_readme.html https://bellard.org/tcc/tccboot_readme.html