4 ms·
Why is it so fast? 8 seconds seems awfully low for the linux kernel.
by lionkor 4y ago
Why is it so fast? 8 seconds seems awfully low for the linux kernel.
- matthews2 4y agoThe version being built (2.4) is over twenty years old and had much less code. If you take a modern kernel (like 5.x) and build configure it with 'make tinyconfig', it should build similarly quickly.
- MuffinFlavored 4y agoCan TinyCC still compile the 5.x kernel without issues?
- rurban 4y agoNo, this is being worked in. The goal should be a -Oboring optimizer without any broken optimizations and aggressive UB assumptions. Something neither gcc nor clang can provide.
- wrycoder 4y agoSee bootstrapping.org
- chexum 4y agohttp://bootstrappable.org http://bootstrappable.org perhaps?
- wrycoder 4y agooops. Thanks! https://bootstrappable.org/ https://bootstrappable.org/ https://bootstrapping.miraheze.org/wiki/Mes https://bootstrapping.miraheze.org/wiki/Mes https://reproducible-builds.org/ https://reproducible-builds.org/ https://archive.fosdem.org/2021/schedule/event/gnumes/ https://archive.fosdem.org/2021/schedule/event/gnumes/
- sylware 4y agoyou cannot, as linux code is using a lot of gcc/clang extensions stuff, namely this is some sort of C dialect, not really C. Almost at every new release of linux, "somebody" did manage to commit into its code the usage of new gcc/clang extensions. The right(TM) way would be to port linux to simple and lean C (like some simple C89 with benign bits of c99/c11): the price is some loss of performance which could be partially mitigated with an assembly port of critical fast-paths (I guess that would show on really loaded servers only). In the end, if RISC-V is a success, namely a world with a pertinent ISA without toxic IP tied to it (like x86/arm), then a full assembly port of linux would be more than interesting in order to rid it from compiler tantrums.
- MuffinFlavored 4y ago> you cannot, as linux code is using a lot of gcc/clang extensions stuff Linux 5.x kernel that is, but not Linux 4.x kernel because that was tcc-compilable?
- pacetherace 4y agoThanks for making me feel old
- hawski 4y agoIt is a single pass compiler, that doesn't do many optimizations. Fun factoid: TCC is sort of predecessor to QEMU.
- phyrex 4y agoThey’re both from the same guy
- masklinn 4y agoYes, but beyond that qemu was pretty much fabrice nerdsniping himself: he initially wanted to make the tcc backend more flexible (to support other targets than x86), then started playing with making the frontend more flexible, at one point he started to make the frontend take in compiled machine code, and that's the starting point of qemu: a dynamic recompiler / machine code translator, rather than a traditional emulator.